var yw=Object.defineProperty;var wp=n=>{throw TypeError(n)};var vw=(n,t,s)=>t in n?yw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var Ie=(n,t,s)=>vw(n,typeof t!="symbol"?t+"":t,s),qu=(n,t,s)=>t.has(n)||wp("Cannot "+s);var R=(n,t,s)=>(qu(n,t,"read from private field"),s?s.call(n):t.get(n)),me=(n,t,s)=>t.has(n)?wp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,s),ee=(n,t,s,i)=>(qu(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s),Pe=(n,t,s)=>(qu(n,t,"access private method"),s);var ba=(n,t,s,i)=>({set _(a){ee(n,t,a,s)},get _(){return R(n,t,i)}});function ww(n,t){for(var s=0;si[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Yc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qu={exports:{}},Di={},Ku={exports:{}},Re={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var xp;function xw(){if(xp)return Re;xp=1;var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=w&&P[w]||P["@@iterator"],typeof P=="function"?P:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,C={};function x(P,z,de){this.props=P,this.context=z,this.refs=C,this.updater=de||j}x.prototype.isReactComponent={},x.prototype.setState=function(P,z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,z,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function S(){}S.prototype=x.prototype;function L(P,z,de){this.props=P,this.context=z,this.refs=C,this.updater=de||j}var T=L.prototype=new S;T.constructor=L,D(T,x.prototype),T.isPureReactComponent=!0;var A=Array.isArray,$=Object.prototype.hasOwnProperty,V={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(P,z,de){var ge,pe={},X=null,we=null;if(z!=null)for(ge in z.ref!==void 0&&(we=z.ref),z.key!==void 0&&(X=""+z.key),z)$.call(z,ge)&&!G.hasOwnProperty(ge)&&(pe[ge]=z[ge]);var Te=arguments.length-2;if(Te===1)pe.children=de;else if(1>>1,z=K[P];if(0>>1;Pa(pe,U))Xa(we,pe)?(K[P]=we,K[X]=U,P=X):(K[P]=pe,K[ge]=U,P=ge);else if(Xa(we,U))K[P]=we,K[X]=U,P=X;else break e}}return ae}function a(K,ae){var U=K.sortIndex-ae.sortIndex;return U!==0?U:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],g=[],v=1,w=null,b=3,j=!1,D=!1,C=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(K){for(var ae=s(g);ae!==null;){if(ae.callback===null)i(g);else if(ae.startTime<=K)i(g),ae.sortIndex=ae.expirationTime,t(p,ae);else break;ae=s(g)}}function A(K){if(C=!1,T(K),!D)if(s(p)!==null)D=!0,_e($);else{var ae=s(g);ae!==null&&Ce(A,ae.startTime-K)}}function $(K,ae){D=!1,C&&(C=!1,S(B),B=-1),j=!0;var U=b;try{for(T(ae),w=s(p);w!==null&&(!(w.expirationTime>ae)||K&&!Se());){var P=w.callback;if(typeof P=="function"){w.callback=null,b=w.priorityLevel;var z=P(w.expirationTime<=ae);ae=n.unstable_now(),typeof z=="function"?w.callback=z:w===s(p)&&i(p),T(ae)}else i(p);w=s(p)}if(w!==null)var de=!0;else{var ge=s(g);ge!==null&&Ce(A,ge.startTime-ae),de=!1}return de}finally{w=null,b=U,j=!1}}var V=!1,G=null,B=-1,oe=5,ce=-1;function Se(){return!(n.unstable_now()-ceK||125P?(K.sortIndex=U,t(g,K),s(p)===null&&K===s(g)&&(C?(S(B),B=-1):C=!0,Ce(A,U-P))):(K.sortIndex=z,t(p,K),D||j||(D=!0,_e($))),K},n.unstable_shouldYield=Se,n.unstable_wrapCallback=function(K){var ae=b;return function(){var U=b;b=ae;try{return K.apply(this,arguments)}finally{b=U}}}})(Yu)),Yu}var Cp;function bw(){return Cp||(Cp=1,Xu.exports=_w()),Xu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var kp;function Cw(){if(kp)return Nt;kp=1;var n=Jc(),t=bw();function s(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},w={};function b(e){return p.call(w,e)?!0:p.call(v,e)?!1:g.test(e)?w[e]=!0:(v[e]=!0,!1)}function j(e,r,o,l){if(o!==null&&o.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function D(e,r,o,l){if(r===null||typeof r>"u"||j(e,r,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function C(e,r,o,l,c,f,y){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=r,this.sanitizeURL=f,this.removeEmptyString=y}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];x[r]=new C(r,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new C(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function L(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(S,L);x[r]=new C(r,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(S,L);x[r]=new C(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(S,L);x[r]=new C(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function T(e,r,o,l){var c=x.hasOwnProperty(r)?x[r]:null;(c!==null?c.type!==0:l||!(2E||c[y]!==f[E]){var k=` `+c[y].replace(" at new "," at ");return e.displayName&&k.includes("")&&(k=k.replace("",e.displayName)),k}while(1<=y&&0<=E);break}}}finally{de=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?z(e):""}function pe(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=ge(e.type,!1),e;case 11:return e=ge(e.type.render,!1),e;case 1:return e=ge(e.type,!0),e;default:return""}}function X(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case V:return"Portal";case oe:return"Profiler";case B:return"StrictMode";case Ee:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Se:return(e.displayName||"Context")+".Consumer";case ce:return(e._context.displayName||"Context")+".Provider";case Ne:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case be:return r=e.displayName||null,r!==null?r:X(e.type)||"Memo";case _e:r=e._payload,e=e._init;try{return X(e(r))}catch{}}return null}function we(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(r);case 8:return r===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Te(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ve(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function nt(e){var r=ve(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,f=o.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,f.call(this,y)}}),Object.defineProperty(e,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Mt(e){e._valueTracker||(e._valueTracker=nt(e))}function at(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var o=r.getValue(),l="";return e&&(l=ve(e)?e.checked?"true":"false":e.value),e=l,e!==o?(r.setValue(e),!0):!1}function Xt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ut(e,r){var o=r.checked;return U({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function zt(e,r){var o=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;o=Te(r.value!=null?r.value:o),e._wrapperState={initialChecked:l,initialValue:o,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function xe(e,r){r=r.checked,r!=null&&T(e,"checked",r,!1)}function lt(e,r){xe(e,r);var o=Te(r.value),l=r.type;if(o!=null)l==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?Jt(e,r.type,o):r.hasOwnProperty("defaultValue")&&Jt(e,r.type,Te(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function Yt(e,r,o){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,o||r===e.value||(e.value=r),e.defaultValue=r}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Jt(e,r,o){(r!=="number"||Xt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Un=Array.isArray;function zn(e,r,o,l){if(e=e.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=go.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Zs(e,r){if(r){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=r;return}}e.textContent=r}var ei={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ev=["Webkit","ms","Moz","O"];Object.keys(ei).forEach(function(e){Ev.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),ei[r]=ei[e]})});function jd(e,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||ei.hasOwnProperty(e)&&ei[e]?(""+r).trim():r+"px"}function Ld(e,r){e=e.style;for(var o in r)if(r.hasOwnProperty(o)){var l=o.indexOf("--")===0,c=jd(o,r[o],l);o==="float"&&(o="cssFloat"),l?e.setProperty(o,c):e[o]=c}}var Sv=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sl(e,r){if(r){if(Sv[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function il(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ol=null;function al(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ll=null,ls=null,us=null;function Id(e){if(e=Si(e)){if(typeof ll!="function")throw Error(s(280));var r=e.stateNode;r&&(r=Uo(r),ll(e.stateNode,e.type,r))}}function Fd(e){ls?us?us.push(e):us=[e]:ls=e}function Dd(){if(ls){var e=ls,r=us;if(us=ls=null,Id(e),r)for(e=0;e>>=0,e===0?32:31-(jv(e)/Lv|0)|0}var Eo=64,So=4194304;function si(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _o(e,r){var o=e.pendingLanes;if(o===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,y=o&268435455;if(y!==0){var E=y&~c;E!==0?l=si(E):(f&=y,f!==0&&(l=si(f)))}else y=o&~c,y!==0?l=si(y):f!==0&&(l=si(f));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,f=r&-r,c>=f||c===16&&(f&4194240)!==0))return r;if((l&4)!==0&&(l|=o&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=l;0o;o++)r.push(e);return r}function ii(e,r,o){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-Zt(r),e[r]=o}function Mv(e,r){var o=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=hi),ff=" ",hf=!1;function pf(e,r){switch(e){case"keyup":return f0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fs=!1;function p0(e,r){switch(e){case"compositionend":return mf(r);case"keypress":return r.which!==32?null:(hf=!0,ff);case"textInput":return e=r.data,e===ff&&hf?null:e;default:return null}}function m0(e,r){if(fs)return e==="compositionend"||!kl&&pf(e,r)?(e=of(),To=xl=Wn=null,fs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:o,offset:r-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Sf(o)}}function bf(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?bf(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function Cf(){for(var e=window,r=Xt();r instanceof e.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)e=r.contentWindow;else break;r=Xt(e.document)}return r}function Nl(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function b0(e){var r=Cf(),o=e.focusedElem,l=e.selectionRange;if(r!==o&&o&&o.ownerDocument&&bf(o.ownerDocument.documentElement,o)){if(l!==null&&Nl(o)){if(r=l.start,e=l.end,e===void 0&&(e=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(e,o.value.length);else if(e=(r=o.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=_f(o,f);var y=_f(o,l);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(r),e.extend(y.node,y.offset)):(r.setEnd(y.node,y.offset),e.addRange(r)))}}for(r=[],e=o;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,hs=null,Pl=null,yi=null,Ol=!1;function kf(e,r,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ol||hs==null||hs!==Xt(l)||(l=hs,"selectionStart"in l&&Nl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),yi&&gi(yi,l)||(yi=l,l=Fo(Pl,"onSelect"),0vs||(e.current=Vl[vs],Vl[vs]=null,vs--)}function Ue(e,r){vs++,Vl[vs]=e.current,e.current=r}var Gn={},pt=Kn(Gn),bt=Kn(!1),Cr=Gn;function ws(e,r){var o=e.type.contextTypes;if(!o)return Gn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in o)c[f]=r[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=c),c}function Ct(e){return e=e.childContextTypes,e!=null}function zo(){Be(bt),Be(pt)}function Bf(e,r,o){if(pt.current!==Gn)throw Error(s(168));Ue(pt,r),Ue(bt,o)}function $f(e,r,o){var l=e.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(s(108,we(e)||"Unknown",c));return U({},o,l)}function Bo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,Cr=pt.current,Ue(pt,e),Ue(bt,bt.current),!0}function Vf(e,r,o){var l=e.stateNode;if(!l)throw Error(s(169));o?(e=$f(e,r,Cr),l.__reactInternalMemoizedMergedChildContext=e,Be(bt),Be(pt),Ue(pt,e)):Be(bt),Ue(bt,o)}var bn=null,$o=!1,Hl=!1;function Hf(e){bn===null?bn=[e]:bn.push(e)}function F0(e){$o=!0,Hf(e)}function Xn(){if(!Hl&&bn!==null){Hl=!0;var e=0,r=De;try{var o=bn;for(De=1;e>=y,c-=y,Cn=1<<32-Zt(r)+c|o<ye?(it=he,he=null):it=he.sibling;var Le=H(I,he,F[ye],Q);if(Le===null){he===null&&(he=it);break}e&&he&&Le.alternate===null&&r(I,he),N=f(Le,N,ye),fe===null?le=Le:fe.sibling=Le,fe=Le,he=it}if(ye===F.length)return o(I,he),$e&&Rr(I,ye),le;if(he===null){for(;yeye?(it=he,he=null):it=he.sibling;var ir=H(I,he,Le.value,Q);if(ir===null){he===null&&(he=it);break}e&&he&&ir.alternate===null&&r(I,he),N=f(ir,N,ye),fe===null?le=ir:fe.sibling=ir,fe=ir,he=it}if(Le.done)return o(I,he),$e&&Rr(I,ye),le;if(he===null){for(;!Le.done;ye++,Le=F.next())Le=q(I,Le.value,Q),Le!==null&&(N=f(Le,N,ye),fe===null?le=Le:fe.sibling=Le,fe=Le);return $e&&Rr(I,ye),le}for(he=l(I,he);!Le.done;ye++,Le=F.next())Le=Z(he,I,ye,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&he.delete(Le.key===null?ye:Le.key),N=f(Le,N,ye),fe===null?le=Le:fe.sibling=Le,fe=Le);return e&&he.forEach(function(gw){return r(I,gw)}),$e&&Rr(I,ye),le}function Ke(I,N,F,Q){if(typeof F=="object"&&F!==null&&F.type===G&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case $:e:{for(var le=F.key,fe=N;fe!==null;){if(fe.key===le){if(le=F.type,le===G){if(fe.tag===7){o(I,fe.sibling),N=c(fe,F.props.children),N.return=I,I=N;break e}}else if(fe.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===_e&&Xf(le)===fe.type){o(I,fe.sibling),N=c(fe,F.props),N.ref=_i(I,fe,F),N.return=I,I=N;break e}o(I,fe);break}else r(I,fe);fe=fe.sibling}F.type===G?(N=Ir(F.props.children,I.mode,Q,F.key),N.return=I,I=N):(Q=ga(F.type,F.key,F.props,null,I.mode,Q),Q.ref=_i(I,N,F),Q.return=I,I=Q)}return y(I);case V:e:{for(fe=F.key;N!==null;){if(N.key===fe)if(N.tag===4&&N.stateNode.containerInfo===F.containerInfo&&N.stateNode.implementation===F.implementation){o(I,N.sibling),N=c(N,F.children||[]),N.return=I,I=N;break e}else{o(I,N);break}else r(I,N);N=N.sibling}N=Bu(F,I.mode,Q),N.return=I,I=N}return y(I);case _e:return fe=F._init,Ke(I,N,fe(F._payload),Q)}if(Un(F))return ne(I,N,F,Q);if(ae(F))return ie(I,N,F,Q);qo(I,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,N!==null&&N.tag===6?(o(I,N.sibling),N=c(N,F),N.return=I,I=N):(o(I,N),N=zu(F,I.mode,Q),N.return=I,I=N),y(I)):o(I,N)}return Ke}var _s=Yf(!0),Jf=Yf(!1),Qo=Kn(null),Ko=null,bs=null,Xl=null;function Yl(){Xl=bs=Ko=null}function Jl(e){var r=Qo.current;Be(Qo),e._currentValue=r}function Zl(e,r,o){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===o)break;e=e.return}}function Cs(e,r){Ko=e,Xl=bs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&r)!==0&&(kt=!0),e.firstContext=null)}function Vt(e){var r=e._currentValue;if(Xl!==e)if(e={context:e,memoizedValue:r,next:null},bs===null){if(Ko===null)throw Error(s(308));bs=e,Ko.dependencies={lanes:0,firstContext:e}}else bs=bs.next=e;return r}var Tr=null;function eu(e){Tr===null?Tr=[e]:Tr.push(e)}function Zf(e,r,o,l){var c=r.interleaved;return c===null?(o.next=o,eu(r)):(o.next=c.next,c.next=o),r.interleaved=o,Rn(e,l)}function Rn(e,r){e.lanes|=r;var o=e.alternate;for(o!==null&&(o.lanes|=r),o=e,e=e.return;e!==null;)e.childLanes|=r,o=e.alternate,o!==null&&(o.childLanes|=r),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Yn=!1;function tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function eh(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tn(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Jn(e,r,o){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(je&2)!==0){var c=l.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),l.pending=r,Rn(e,o)}return c=l.interleaved,c===null?(r.next=r,eu(l)):(r.next=c.next,c.next=r),l.interleaved=r,Rn(e,o)}function Go(e,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194240)!==0)){var l=r.lanes;l&=e.pendingLanes,o|=l,r.lanes=o,ml(e,o)}}function th(e,r){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var c=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var y={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?c=f=y:f=f.next=y,o=o.next}while(o!==null);f===null?c=f=r:f=f.next=r}else c=f=r;o={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=r:e.next=r,o.lastBaseUpdate=r}function Xo(e,r,o,l){var c=e.updateQueue;Yn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var k=E,M=k.next;k.next=null,y===null?f=M:y.next=M,y=k;var W=e.alternate;W!==null&&(W=W.updateQueue,E=W.lastBaseUpdate,E!==y&&(E===null?W.firstBaseUpdate=M:E.next=M,W.lastBaseUpdate=k))}if(f!==null){var q=c.baseState;y=0,W=M=k=null,E=f;do{var H=E.lane,Z=E.eventTime;if((l&H)===H){W!==null&&(W=W.next={eventTime:Z,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var ne=e,ie=E;switch(H=r,Z=o,ie.tag){case 1:if(ne=ie.payload,typeof ne=="function"){q=ne.call(Z,q,H);break e}q=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=ie.payload,H=typeof ne=="function"?ne.call(Z,q,H):ne,H==null)break e;q=U({},q,H);break e;case 2:Yn=!0}}E.callback!==null&&E.lane!==0&&(e.flags|=64,H=c.effects,H===null?c.effects=[E]:H.push(E))}else Z={eventTime:Z,lane:H,tag:E.tag,payload:E.payload,callback:E.callback,next:null},W===null?(M=W=Z,k=q):W=W.next=Z,y|=H;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;H=E,E=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);if(W===null&&(k=q),c.baseState=k,c.firstBaseUpdate=M,c.lastBaseUpdate=W,r=c.shared.interleaved,r!==null){c=r;do y|=c.lane,c=c.next;while(c!==r)}else f===null&&(c.shared.lanes=0);Or|=y,e.lanes=y,e.memoizedState=q}}function nh(e,r,o){if(e=r.effects,r.effects=null,e!==null)for(r=0;ro?o:4,e(!0);var l=ou.transition;ou.transition={};try{e(!1),r()}finally{De=o,ou.transition=l}}function Eh(){return Ht().memoizedState}function z0(e,r,o){var l=nr(e);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},Sh(e))_h(r,o);else if(o=Zf(e,r,o,l),o!==null){var c=St();on(o,e,l,c),bh(o,r,l)}}function B0(e,r,o){var l=nr(e),c={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(Sh(e))_h(r,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var y=r.lastRenderedState,E=f(y,o);if(c.hasEagerState=!0,c.eagerState=E,en(E,y)){var k=r.interleaved;k===null?(c.next=c,eu(r)):(c.next=k.next,k.next=c),r.interleaved=c;return}}catch{}finally{}o=Zf(e,r,c,l),o!==null&&(c=St(),on(o,e,l,c),bh(o,r,l))}}function Sh(e){var r=e.alternate;return e===He||r!==null&&r===He}function _h(e,r){Ri=Zo=!0;var o=e.pending;o===null?r.next=r:(r.next=o.next,o.next=r),e.pending=r}function bh(e,r,o){if((o&4194240)!==0){var l=r.lanes;l&=e.pendingLanes,o|=l,r.lanes=o,ml(e,o)}}var na={readContext:Vt,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},$0={readContext:Vt,useCallback:function(e,r){return pn().memoizedState=[e,r===void 0?null:r],e},useContext:Vt,useEffect:hh,useImperativeHandle:function(e,r,o){return o=o!=null?o.concat([e]):null,ea(4194308,4,gh.bind(null,r,e),o)},useLayoutEffect:function(e,r){return ea(4194308,4,e,r)},useInsertionEffect:function(e,r){return ea(4,2,e,r)},useMemo:function(e,r){var o=pn();return r=r===void 0?null:r,e=e(),o.memoizedState=[e,r],e},useReducer:function(e,r,o){var l=pn();return r=o!==void 0?o(r):r,l.memoizedState=l.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=z0.bind(null,He,e),[l.memoizedState,e]},useRef:function(e){var r=pn();return e={current:e},r.memoizedState=e},useState:dh,useDebugValue:hu,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=dh(!1),r=e[0];return e=U0.bind(null,e[1]),pn().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,o){var l=He,c=pn();if($e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=r(),st===null)throw Error(s(349));(Pr&30)!==0||oh(l,r,o)}c.memoizedState=o;var f={value:o,getSnapshot:r};return c.queue=f,hh(lh.bind(null,l,f,e),[e]),l.flags|=2048,Pi(9,ah.bind(null,l,f,o,r),void 0,null),o},useId:function(){var e=pn(),r=st.identifierPrefix;if($e){var o=kn,l=Cn;o=(l&~(1<<32-Zt(l)-1)).toString(32)+o,r=":"+r+"R"+o,o=Ti++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=y.createElement(o,{is:l.is}):(e=y.createElement(o),o==="select"&&(y=e,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):e=y.createElementNS(e,o),e[fn]=r,e[Ei]=l,Hh(e,r,!1,!1),r.stateNode=e;e:{switch(y=il(o,l),o){case"dialog":ze("cancel",e),ze("close",e),c=l;break;case"iframe":case"object":case"embed":ze("load",e),c=l;break;case"video":case"audio":for(c=0;cPs&&(r.flags|=128,l=!0,Oi(f,!1),r.lanes=4194304)}else{if(!l)if(e=Yo(y),e!==null){if(r.flags|=128,l=!0,o=e.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),Oi(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!$e)return gt(r),null}else 2*Qe()-f.renderingStartTime>Ps&&o!==1073741824&&(r.flags|=128,l=!0,Oi(f,!1),r.lanes=4194304);f.isBackwards?(y.sibling=r.child,r.child=y):(o=f.last,o!==null?o.sibling=y:r.child=y,f.last=y)}return f.tail!==null?(r=f.tail,f.rendering=r,f.tail=r.sibling,f.renderingStartTime=Qe(),r.sibling=null,o=Ve.current,Ue(Ve,l?o&1|2:o&1),r):(gt(r),null);case 22:case 23:return Du(),l=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(Ft&1073741824)!==0&&(gt(r),r.subtreeFlags&6&&(r.flags|=8192)):gt(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function X0(e,r){switch(ql(r),r.tag){case 1:return Ct(r.type)&&zo(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return ks(),Be(bt),Be(pt),iu(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 5:return ru(r),null;case 13:if(Be(Ve),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Ss()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Be(Ve),null;case 4:return ks(),null;case 10:return Jl(r.type._context),null;case 22:case 23:return Du(),null;case 24:return null;default:return null}}var oa=!1,yt=!1,Y0=typeof WeakSet=="function"?WeakSet:Set,te=null;function Ts(e,r){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){We(e,r,l)}else o.current=null}function Cu(e,r,o){try{o()}catch(l){We(e,r,l)}}var Qh=!1;function J0(e,r){if(Dl=ko,e=Cf(),Nl(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{o.nodeType,f.nodeType}catch{o=null;break e}var y=0,E=-1,k=-1,M=0,W=0,q=e,H=null;t:for(;;){for(var Z;q!==o||c!==0&&q.nodeType!==3||(E=y+c),q!==f||l!==0&&q.nodeType!==3||(k=y+l),q.nodeType===3&&(y+=q.nodeValue.length),(Z=q.firstChild)!==null;)H=q,q=Z;for(;;){if(q===e)break t;if(H===o&&++M===c&&(E=y),H===f&&++W===l&&(k=y),(Z=q.nextSibling)!==null)break;q=H,H=q.parentNode}q=Z}o=E===-1||k===-1?null:{start:E,end:k}}else o=null}o=o||{start:0,end:0}}else o=null;for(Ml={focusedElem:e,selectionRange:o},ko=!1,te=r;te!==null;)if(r=te,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,te=e;else for(;te!==null;){r=te;try{var ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var ie=ne.memoizedProps,Ke=ne.memoizedState,I=r.stateNode,N=I.getSnapshotBeforeUpdate(r.elementType===r.type?ie:nn(r.type,ie),Ke);I.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var F=r.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){We(r,r.return,Q)}if(e=r.sibling,e!==null){e.return=r.return,te=e;break}te=r.return}return ne=Qh,Qh=!1,ne}function Ai(e,r,o){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Cu(r,o,f)}c=c.next}while(c!==l)}}function aa(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.create;o.destroy=l()}o=o.next}while(o!==r)}}function ku(e){var r=e.ref;if(r!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof r=="function"?r(e):r.current=e}}function Kh(e){var r=e.alternate;r!==null&&(e.alternate=null,Kh(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[fn],delete r[Ei],delete r[$l],delete r[L0],delete r[I0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gh(e){return e.tag===5||e.tag===3||e.tag===4}function Xh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ru(e,r,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?o.nodeType===8?o.parentNode.insertBefore(e,r):o.insertBefore(e,r):(o.nodeType===8?(r=o.parentNode,r.insertBefore(e,o)):(r=o,r.appendChild(e)),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=Mo));else if(l!==4&&(e=e.child,e!==null))for(Ru(e,r,o),e=e.sibling;e!==null;)Ru(e,r,o),e=e.sibling}function Tu(e,r,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?o.insertBefore(e,r):o.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Tu(e,r,o),e=e.sibling;e!==null;)Tu(e,r,o),e=e.sibling}var ut=null,rn=!1;function Zn(e,r,o){for(o=o.child;o!==null;)Yh(e,r,o),o=o.sibling}function Yh(e,r,o){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(xo,o)}catch{}switch(o.tag){case 5:yt||Ts(o,r);case 6:var l=ut,c=rn;ut=null,Zn(e,r,o),ut=l,rn=c,ut!==null&&(rn?(e=ut,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):ut.removeChild(o.stateNode));break;case 18:ut!==null&&(rn?(e=ut,o=o.stateNode,e.nodeType===8?Bl(e.parentNode,o):e.nodeType===1&&Bl(e,o),ci(e)):Bl(ut,o.stateNode));break;case 4:l=ut,c=rn,ut=o.stateNode.containerInfo,rn=!0,Zn(e,r,o),ut=l,rn=c;break;case 0:case 11:case 14:case 15:if(!yt&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&Cu(o,r,y),c=c.next}while(c!==l)}Zn(e,r,o);break;case 1:if(!yt&&(Ts(o,r),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(E){We(o,r,E)}Zn(e,r,o);break;case 21:Zn(e,r,o);break;case 22:o.mode&1?(yt=(l=yt)||o.memoizedState!==null,Zn(e,r,o),yt=l):Zn(e,r,o);break;default:Zn(e,r,o)}}function Jh(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Y0),r.forEach(function(l){var c=aw.bind(null,e,l);o.has(l)||(o.add(l),l.then(c,c))})}}function sn(e,r){var o=r.deletions;if(o!==null)for(var l=0;lc&&(c=y),l&=~f}if(l=c,l=Qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*ew(l/1960))-l,10e?16:e,tr===null)var l=!1;else{if(e=tr,tr=null,fa=0,(je&6)!==0)throw Error(s(331));var c=je;for(je|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var E=f.deletions;if(E!==null){for(var k=0;kQe()-Ou?jr(e,0):Pu|=o),Tt(e,r)}function dp(e,r){r===0&&((e.mode&1)===0?r=1:(r=So,So<<=1,(So&130023424)===0&&(So=4194304)));var o=St();e=Rn(e,r),e!==null&&(ii(e,r,o),Tt(e,o))}function ow(e){var r=e.memoizedState,o=0;r!==null&&(o=r.retryLane),dp(e,o)}function aw(e,r){var o=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(r),dp(e,o)}var fp;fp=function(e,r,o){if(e!==null)if(e.memoizedProps!==r.pendingProps||bt.current)kt=!0;else{if((e.lanes&o)===0&&(r.flags&128)===0)return kt=!1,K0(e,r,o);kt=(e.flags&131072)!==0}else kt=!1,$e&&(r.flags&1048576)!==0&&Wf(r,Ho,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;ia(e,r),e=r.pendingProps;var c=ws(r,pt.current);Cs(r,o),c=lu(null,r,l,e,c,o);var f=uu();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Ct(l)?(f=!0,Bo(r)):f=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,tu(r),c.updater=ra,r.stateNode=c,c._reactInternals=r,mu(r,l,e,o),r=wu(null,r,l,!0,f,o)):(r.tag=0,$e&&f&&Wl(r),Et(null,r,c,o),r=r.child),r;case 16:l=r.elementType;e:{switch(ia(e,r),e=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=uw(l),e=nn(l,e),c){case 0:r=vu(null,r,l,e,o);break e;case 1:r=Mh(null,r,l,e,o);break e;case 11:r=jh(null,r,l,e,o);break e;case 14:r=Lh(null,r,l,nn(l.type,e),o);break e}throw Error(s(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:nn(l,c),vu(e,r,l,c,o);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:nn(l,c),Mh(e,r,l,c,o);case 3:e:{if(Uh(r),e===null)throw Error(s(387));l=r.pendingProps,f=r.memoizedState,c=f.element,eh(e,r),Xo(r,l,null,o);var y=r.memoizedState;if(l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){c=Rs(Error(s(423)),r),r=zh(e,r,l,o,c);break e}else if(l!==c){c=Rs(Error(s(424)),r),r=zh(e,r,l,o,c);break e}else for(It=Qn(r.stateNode.containerInfo.firstChild),Lt=r,$e=!0,tn=null,o=Jf(r,null,l,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ss(),l===c){r=Nn(e,r,o);break e}Et(e,r,l,o)}r=r.child}return r;case 5:return rh(r),e===null&&Kl(r),l=r.type,c=r.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,Ul(l,c)?y=null:f!==null&&Ul(l,f)&&(r.flags|=32),Dh(e,r),Et(e,r,y,o),r.child;case 6:return e===null&&Kl(r),null;case 13:return Bh(e,r,o);case 4:return nu(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=_s(r,null,l,o):Et(e,r,l,o),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:nn(l,c),jh(e,r,l,c,o);case 7:return Et(e,r,r.pendingProps,o),r.child;case 8:return Et(e,r,r.pendingProps.children,o),r.child;case 12:return Et(e,r,r.pendingProps.children,o),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,f=r.memoizedProps,y=c.value,Ue(Qo,l._currentValue),l._currentValue=y,f!==null)if(en(f.value,y)){if(f.children===c.children&&!bt.current){r=Nn(e,r,o);break e}}else for(f=r.child,f!==null&&(f.return=r);f!==null;){var E=f.dependencies;if(E!==null){y=f.child;for(var k=E.firstContext;k!==null;){if(k.context===l){if(f.tag===1){k=Tn(-1,o&-o),k.tag=2;var M=f.updateQueue;if(M!==null){M=M.shared;var W=M.pending;W===null?k.next=k:(k.next=W.next,W.next=k),M.pending=k}}f.lanes|=o,k=f.alternate,k!==null&&(k.lanes|=o),Zl(f.return,o,r),E.lanes|=o;break}k=k.next}}else if(f.tag===10)y=f.type===r.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(s(341));y.lanes|=o,E=y.alternate,E!==null&&(E.lanes|=o),Zl(y,o,r),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===r){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}Et(e,r,c.children,o),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,Cs(r,o),c=Vt(c),l=l(c),r.flags|=1,Et(e,r,l,o),r.child;case 14:return l=r.type,c=nn(l,r.pendingProps),c=nn(l.type,c),Lh(e,r,l,c,o);case 15:return Ih(e,r,r.type,r.pendingProps,o);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:nn(l,c),ia(e,r),r.tag=1,Ct(l)?(e=!0,Bo(r)):e=!1,Cs(r,o),kh(r,l,c),mu(r,l,c,o),wu(null,r,l,!0,e,o);case 19:return Vh(e,r,o);case 22:return Fh(e,r,o)}throw Error(s(156,r.tag))};function hp(e,r){return Wd(e,r)}function lw(e,r,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,r,o,l){return new lw(e,r,o,l)}function Uu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uw(e){if(typeof e=="function")return Uu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ne)return 11;if(e===be)return 14}return 2}function sr(e,r){var o=e.alternate;return o===null?(o=qt(e.tag,r,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=r,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,r=e.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function ga(e,r,o,l,c,f){var y=2;if(l=e,typeof e=="function")Uu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Ir(o.children,c,f,r);case B:y=8,c|=8;break;case oe:return e=qt(12,o,r,c|2),e.elementType=oe,e.lanes=f,e;case Ee:return e=qt(13,o,r,c),e.elementType=Ee,e.lanes=f,e;case J:return e=qt(19,o,r,c),e.elementType=J,e.lanes=f,e;case Ce:return ya(o,c,f,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ce:y=10;break e;case Se:y=9;break e;case Ne:y=11;break e;case be:y=14;break e;case _e:y=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return r=qt(y,o,r,c),r.elementType=e,r.type=l,r.lanes=f,r}function Ir(e,r,o,l){return e=qt(7,e,l,r),e.lanes=o,e}function ya(e,r,o,l){return e=qt(22,e,l,r),e.elementType=Ce,e.lanes=o,e.stateNode={isHidden:!1},e}function zu(e,r,o){return e=qt(6,e,null,r),e.lanes=o,e}function Bu(e,r,o){return r=qt(4,e.children!==null?e.children:[],e.key,r),r.lanes=o,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function cw(e,r,o,l,c){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pl(0),this.expirationTimes=pl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pl(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function $u(e,r,o,l,c,f,y,E,k){return e=new cw(e,r,o,E,k),r===1?(r=1,f===!0&&(r|=8)):r=0,f=qt(3,null,null,r),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},tu(f),e}function dw(e,r,o){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Gu.exports=Cw(),Gu.exports}var Tp;function kw(){if(Tp)return Ca;Tp=1;var n=ug();return Ca.createRoot=n.createRoot,Ca.hydrateRoot=n.hydrateRoot,Ca}var Rw=kw();const Tw=Yc(Rw),Nw=20,Pw=1e6,Dn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Ju=0;function Ow(){return Ju=(Ju+1)%Number.MAX_VALUE,Ju.toString()}const Zu=new Map,Np=n=>{if(Zu.has(n))return;const t=setTimeout(()=>{Zu.delete(n),Ki({type:Dn.REMOVE_TOAST,toastId:n})},Pw);Zu.set(n,t)},Aw=(n,t)=>{switch(t.type){case Dn.ADD_TOAST:return{...n,toasts:[t.toast,...n.toasts].slice(0,Nw)};case Dn.UPDATE_TOAST:return{...n,toasts:n.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case Dn.DISMISS_TOAST:{const{toastId:s}=t;return s?Np(s):n.toasts.forEach(i=>{Np(i.id)}),{...n,toasts:n.toasts.map(i=>i.id===s||s===void 0?{...i,open:!1}:i)}}case Dn.REMOVE_TOAST:return t.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==t.toastId)}}},Ia=[];let Fa={toasts:[]};function Ki(n){Fa=Aw(Fa,n),Ia.forEach(t=>{t(Fa)})}function jw({...n}){const t=Ow(),s=a=>Ki({type:Dn.UPDATE_TOAST,toast:{...a,id:t}}),i=()=>Ki({type:Dn.DISMISS_TOAST,toastId:t});return Ki({type:Dn.ADD_TOAST,toast:{...n,id:t,open:!0,onOpenChange:a=>{a||i()}}}),{id:t,dismiss:i,update:s}}function Lw(){const[n,t]=_.useState(Fa);return _.useEffect(()=>(Ia.push(t),()=>{const s=Ia.indexOf(t);s>-1&&Ia.splice(s,1)}),[n]),{...n,toast:jw,dismiss:s=>Ki({type:Dn.DISMISS_TOAST,toastId:s})}}var Zc=ug();const Iw=Yc(Zc);function Dt(n,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(n==null||n(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Pp(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function ed(...n){return t=>{let s=!1;const i=n.map(a=>{const u=Pp(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var S;const{scope:b,children:j,...D}=w,C=((S=b==null?void 0:b[n])==null?void 0:S[p])||h,x=_.useMemo(()=>D,Object.values(D));return m.jsx(C.Provider,{value:x,children:j})};g.displayName=u+"Provider";function v(w,b){var C;const j=((C=b==null?void 0:b[n])==null?void 0:C[p])||h,D=_.useContext(j);if(D)return D;if(d!==void 0)return d;throw new Error(`\`${w}\` must be used within \`${u}\``)}return[g,v]}const a=()=>{const u=s.map(d=>_.createContext(d));return function(h){const p=(h==null?void 0:h[n])||u;return _.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return a.scopeName=n,[i,Fw(a,...t)]}function Fw(...n){const t=n[0];if(n.length===1)return t;const s=()=>{const i=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=i.reduce((h,{useScope:p,scopeName:g})=>{const w=p(u)[`__scope${g}`];return{...h,...w}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function Op(n){const t=Dw(n),s=_.forwardRef((i,a)=>{const{children:u,...d}=i,h=_.Children.toArray(u),p=h.find(Uw);if(p){const g=p.props.children,v=h.map(w=>w===p?_.Children.count(g)>1?_.Children.only(null):_.isValidElement(g)?g.props.children:null:w);return m.jsx(t,{...d,ref:a,children:_.isValidElement(g)?_.cloneElement(g,void 0,v):null})}return m.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Dw(n){const t=_.forwardRef((s,i)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=Bw(a),h=zw(u,a.props);return a.type!==_.Fragment&&(h.ref=i?ed(i,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var Mw=Symbol("radix.slottable");function Uw(n){return _.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Mw}function zw(n,t){const s={...t};for(const i in t){const a=n[i],u=t[i];/^on[A-Z]/.test(i)?a&&u?s[i]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[i]=a):i==="style"?s[i]={...a,...u}:i==="className"&&(s[i]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Bw(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function $w(n){const t=n+"CollectionProvider",[s,i]=cg(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=C=>{const{scope:x,children:S}=C,L=jn.useRef(null),T=jn.useRef(new Map).current;return m.jsx(a,{scope:x,itemMap:T,collectionRef:L,children:S})};d.displayName=t;const h=n+"CollectionSlot",p=Op(h),g=jn.forwardRef((C,x)=>{const{scope:S,children:L}=C,T=u(h,S),A=es(x,T.collectionRef);return m.jsx(p,{ref:A,children:L})});g.displayName=h;const v=n+"CollectionItemSlot",w="data-radix-collection-item",b=Op(v),j=jn.forwardRef((C,x)=>{const{scope:S,children:L,...T}=C,A=jn.useRef(null),$=es(x,A),V=u(v,S);return jn.useEffect(()=>(V.itemMap.set(A,{ref:A,...T}),()=>void V.itemMap.delete(A))),m.jsx(b,{[w]:"",ref:$,children:L})});j.displayName=v;function D(C){const x=u(n+"CollectionConsumer",C);return jn.useCallback(()=>{const L=x.collectionRef.current;if(!L)return[];const T=Array.from(L.querySelectorAll(`[${w}]`));return Array.from(x.itemMap.values()).sort((V,G)=>T.indexOf(V.ref.current)-T.indexOf(G.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:d,Slot:g,ItemSlot:j},D,i]}function Vw(n){const t=Hw(n),s=_.forwardRef((i,a)=>{const{children:u,...d}=i,h=_.Children.toArray(u),p=h.find(qw);if(p){const g=p.props.children,v=h.map(w=>w===p?_.Children.count(g)>1?_.Children.only(null):_.isValidElement(g)?g.props.children:null:w);return m.jsx(t,{...d,ref:a,children:_.isValidElement(g)?_.cloneElement(g,void 0,v):null})}return m.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Hw(n){const t=_.forwardRef((s,i)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=Kw(a),h=Qw(u,a.props);return a.type!==_.Fragment&&(h.ref=i?ed(i,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var Ww=Symbol("radix.slottable");function qw(n){return _.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ww}function Qw(n,t){const s={...t};for(const i in t){const a=n[i],u=t[i];/^on[A-Z]/.test(i)?a&&u?s[i]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[i]=a):i==="style"?s[i]={...a,...u}:i==="className"&&(s[i]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Kw(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Gw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],En=Gw.reduce((n,t)=>{const s=Vw(`Primitive.${t}`),i=_.forwardRef((a,u)=>{const{asChild:d,...h}=a,p=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${t}`,{...n,[t]:i}},{});function dg(n,t){n&&Zc.flushSync(()=>n.dispatchEvent(t))}function ts(n){const t=_.useRef(n);return _.useEffect(()=>{t.current=n}),_.useMemo(()=>(...s)=>{var i;return(i=t.current)==null?void 0:i.call(t,...s)},[])}function Xw(n,t=globalThis==null?void 0:globalThis.document){const s=ts(n);_.useEffect(()=>{const i=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[s,t])}var Yw="DismissableLayer",mc="dismissableLayer.update",Jw="dismissableLayer.pointerDownOutside",Zw="dismissableLayer.focusOutside",Ap,fg=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hg=_.forwardRef((n,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=n,g=_.useContext(fg),[v,w]=_.useState(null),b=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=_.useState({}),D=es(t,G=>w(G)),C=Array.from(g.layers),[x]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),S=C.indexOf(x),L=v?C.indexOf(v):-1,T=g.layersWithOutsidePointerEventsDisabled.size>0,A=L>=S,$=tx(G=>{const B=G.target,oe=[...g.branches].some(ce=>ce.contains(B));!A||oe||(a==null||a(G),d==null||d(G),G.defaultPrevented||h==null||h())},b),V=nx(G=>{const B=G.target;[...g.branches].some(ce=>ce.contains(B))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},b);return Xw(G=>{L===g.layers.size-1&&(i==null||i(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},b),_.useEffect(()=>{if(v)return s&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Ap=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(v)),g.layers.add(v),jp(),()=>{s&&g.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Ap)}},[v,b,s,g]),_.useEffect(()=>()=>{v&&(g.layers.delete(v),g.layersWithOutsidePointerEventsDisabled.delete(v),jp())},[v,g]),_.useEffect(()=>{const G=()=>j({});return document.addEventListener(mc,G),()=>document.removeEventListener(mc,G)},[]),m.jsx(En.div,{...p,ref:D,style:{pointerEvents:T?A?"auto":"none":void 0,...n.style},onFocusCapture:Dt(n.onFocusCapture,V.onFocusCapture),onBlurCapture:Dt(n.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Dt(n.onPointerDownCapture,$.onPointerDownCapture)})});hg.displayName=Yw;var ex="DismissableLayerBranch",pg=_.forwardRef((n,t)=>{const s=_.useContext(fg),i=_.useRef(null),a=es(t,i);return _.useEffect(()=>{const u=i.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),m.jsx(En.div,{...n,ref:a})});pg.displayName=ex;function tx(n,t=globalThis==null?void 0:globalThis.document){const s=ts(n),i=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let p=function(){mg(Jw,s,g,{discrete:!0})};const g={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);i.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>i.current=!0}}function nx(n,t=globalThis==null?void 0:globalThis.document){const s=ts(n),i=_.useRef(!1);return _.useEffect(()=>{const a=u=>{u.target&&!i.current&&mg(Zw,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function jp(){const n=new CustomEvent(mc);document.dispatchEvent(n)}function mg(n,t,s,{discrete:i}){const a=s.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),i?dg(a,u):a.dispatchEvent(u)}var rx=hg,sx=pg,Xi=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},ix="Portal",gg=_.forwardRef((n,t)=>{var h;const{container:s,...i}=n,[a,u]=_.useState(!1);Xi(()=>u(!0),[]);const d=s||a&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?Iw.createPortal(m.jsx(En.div,{...i,ref:t}),d):null});gg.displayName=ix;function ox(n,t){return _.useReducer((s,i)=>t[s][i]??s,n)}var yg=n=>{const{present:t,children:s}=n,i=ax(t),a=typeof s=="function"?s({present:i.isPresent}):_.Children.only(s),u=es(i.ref,lx(a));return typeof s=="function"||i.isPresent?_.cloneElement(a,{ref:u}):null};yg.displayName="Presence";function ax(n){const[t,s]=_.useState(),i=_.useRef(null),a=_.useRef(n),u=_.useRef("none"),d=n?"mounted":"unmounted",[h,p]=ox(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const g=ka(i.current);u.current=h==="mounted"?g:"none"},[h]),Xi(()=>{const g=i.current,v=a.current;if(v!==n){const b=u.current,j=ka(g);n?p("MOUNT"):j==="none"||(g==null?void 0:g.display)==="none"?p("UNMOUNT"):p(v&&b!==j?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,p]),Xi(()=>{if(t){let g;const v=t.ownerDocument.defaultView??window,w=j=>{const C=ka(i.current).includes(CSS.escape(j.animationName));if(j.target===t&&C&&(p("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",g=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},b=j=>{j.target===t&&(u.current=ka(i.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",w),t.addEventListener("animationend",w),()=>{v.clearTimeout(g),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",w),t.removeEventListener("animationend",w)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:_.useCallback(g=>{i.current=g?getComputedStyle(g):null,s(g)},[])}}function ka(n){return(n==null?void 0:n.animationName)||"none"}function lx(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var ux=lg[" useInsertionEffect ".trim().toString()]||Xi;function cx({prop:n,defaultProp:t,onChange:s=()=>{},caller:i}){const[a,u,d]=dx({defaultProp:t,onChange:s}),h=n!==void 0,p=h?n:a;{const v=_.useRef(n!==void 0);_.useEffect(()=>{const w=v.current;w!==h&&console.warn(`${i} is changing from ${w?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=h},[h,i])}const g=_.useCallback(v=>{var w;if(h){const b=fx(v)?v(n):v;b!==n&&((w=d.current)==null||w.call(d,b))}else u(v)},[h,n,u,d]);return[p,g]}function dx({defaultProp:n,onChange:t}){const[s,i]=_.useState(n),a=_.useRef(s),u=_.useRef(t);return ux(()=>{u.current=t},[t]),_.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,i,u]}function fx(n){return typeof n=="function"}var hx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),px="VisuallyHidden",td=_.forwardRef((n,t)=>m.jsx(En.span,{...n,ref:t,style:{...hx,...n.style}}));td.displayName=px;var nd="ToastProvider",[rd,mx,gx]=$w("Toast"),[vg]=cg("Toast",[gx]),[yx,Xa]=vg(nd),wg=n=>{const{__scopeToast:t,label:s="Notification",duration:i=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=n,[h,p]=_.useState(null),[g,v]=_.useState(0),w=_.useRef(!1),b=_.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${nd}\`. Expected non-empty \`string\`.`),m.jsx(rd.Provider,{scope:t,children:m.jsx(yx,{scope:t,label:s,duration:i,swipeDirection:a,swipeThreshold:u,toastCount:g,viewport:h,onViewportChange:p,onToastAdd:_.useCallback(()=>v(j=>j+1),[]),onToastRemove:_.useCallback(()=>v(j=>j-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:b,children:d})})};wg.displayName=nd;var xg="ToastViewport",vx=["F8"],gc="toast.viewportPause",yc="toast.viewportResume",Eg=_.forwardRef((n,t)=>{const{__scopeToast:s,hotkey:i=vx,label:a="Notifications ({hotkey})",...u}=n,d=Xa(xg,s),h=mx(s),p=_.useRef(null),g=_.useRef(null),v=_.useRef(null),w=_.useRef(null),b=es(t,w,d.onViewportChange),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=d.toastCount>0;_.useEffect(()=>{const x=S=>{var T;i.length!==0&&i.every(A=>S[A]||S.code===A)&&((T=w.current)==null||T.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i]),_.useEffect(()=>{const x=p.current,S=w.current;if(D&&x&&S){const L=()=>{if(!d.isClosePausedRef.current){const V=new CustomEvent(gc);S.dispatchEvent(V),d.isClosePausedRef.current=!0}},T=()=>{if(d.isClosePausedRef.current){const V=new CustomEvent(yc);S.dispatchEvent(V),d.isClosePausedRef.current=!1}},A=V=>{!x.contains(V.relatedTarget)&&T()},$=()=>{x.contains(document.activeElement)||T()};return x.addEventListener("focusin",L),x.addEventListener("focusout",A),x.addEventListener("pointermove",L),x.addEventListener("pointerleave",$),window.addEventListener("blur",L),window.addEventListener("focus",T),()=>{x.removeEventListener("focusin",L),x.removeEventListener("focusout",A),x.removeEventListener("pointermove",L),x.removeEventListener("pointerleave",$),window.removeEventListener("blur",L),window.removeEventListener("focus",T)}}},[D,d.isClosePausedRef]);const C=_.useCallback(({tabbingDirection:x})=>{const L=h().map(T=>{const A=T.ref.current,$=[A,...Ox(A)];return x==="forwards"?$:$.reverse()});return(x==="forwards"?L.reverse():L).flat()},[h]);return _.useEffect(()=>{const x=w.current;if(x){const S=L=>{var $,V,G;const T=L.altKey||L.ctrlKey||L.metaKey;if(L.key==="Tab"&&!T){const B=document.activeElement,oe=L.shiftKey;if(L.target===x&&oe){($=g.current)==null||$.focus();return}const Ne=C({tabbingDirection:oe?"backwards":"forwards"}),Ee=Ne.findIndex(J=>J===B);ec(Ne.slice(Ee+1))?L.preventDefault():oe?(V=g.current)==null||V.focus():(G=v.current)==null||G.focus()}};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)}},[h,C]),m.jsxs(sx,{ref:p,role:"region","aria-label":a.replace("{hotkey}",j),tabIndex:-1,style:{pointerEvents:D?void 0:"none"},children:[D&&m.jsx(vc,{ref:g,onFocusFromOutsideViewport:()=>{const x=C({tabbingDirection:"forwards"});ec(x)}}),m.jsx(rd.Slot,{scope:s,children:m.jsx(En.ol,{tabIndex:-1,...u,ref:b})}),D&&m.jsx(vc,{ref:v,onFocusFromOutsideViewport:()=>{const x=C({tabbingDirection:"backwards"});ec(x)}})]})});Eg.displayName=xg;var Sg="ToastFocusProxy",vc=_.forwardRef((n,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:i,...a}=n,u=Xa(Sg,s);return m.jsx(td,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var g;const h=d.relatedTarget;!((g=u.viewport)!=null&&g.contains(h))&&i()}})});vc.displayName=Sg;var ao="Toast",wx="toast.swipeStart",xx="toast.swipeMove",Ex="toast.swipeCancel",Sx="toast.swipeEnd",_g=_.forwardRef((n,t)=>{const{forceMount:s,open:i,defaultOpen:a,onOpenChange:u,...d}=n,[h,p]=cx({prop:i,defaultProp:a??!0,onChange:u,caller:ao});return m.jsx(yg,{present:s||h,children:m.jsx(Cx,{open:h,...d,ref:t,onClose:()=>p(!1),onPause:ts(n.onPause),onResume:ts(n.onResume),onSwipeStart:Dt(n.onSwipeStart,g=>{g.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Dt(n.onSwipeMove,g=>{const{x:v,y:w}=g.detail.delta;g.currentTarget.setAttribute("data-swipe","move"),g.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),g.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:Dt(n.onSwipeCancel,g=>{g.currentTarget.setAttribute("data-swipe","cancel"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),g.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Dt(n.onSwipeEnd,g=>{const{x:v,y:w}=g.detail.delta;g.currentTarget.setAttribute("data-swipe","end"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),g.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),g.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),p(!1)})})})});_g.displayName=ao;var[_x,bx]=vg(ao,{onClose(){}}),Cx=_.forwardRef((n,t)=>{const{__scopeToast:s,type:i="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:h,onPause:p,onResume:g,onSwipeStart:v,onSwipeMove:w,onSwipeCancel:b,onSwipeEnd:j,...D}=n,C=Xa(ao,s),[x,S]=_.useState(null),L=es(t,J=>S(J)),T=_.useRef(null),A=_.useRef(null),$=a||C.duration,V=_.useRef(0),G=_.useRef($),B=_.useRef(0),{onToastAdd:oe,onToastRemove:ce}=C,Se=ts(()=>{var be;(x==null?void 0:x.contains(document.activeElement))&&((be=C.viewport)==null||be.focus()),d()}),Ne=_.useCallback(J=>{!J||J===1/0||(window.clearTimeout(B.current),V.current=new Date().getTime(),B.current=window.setTimeout(Se,J))},[Se]);_.useEffect(()=>{const J=C.viewport;if(J){const be=()=>{Ne(G.current),g==null||g()},_e=()=>{const Ce=new Date().getTime()-V.current;G.current=G.current-Ce,window.clearTimeout(B.current),p==null||p()};return J.addEventListener(gc,_e),J.addEventListener(yc,be),()=>{J.removeEventListener(gc,_e),J.removeEventListener(yc,be)}}},[C.viewport,$,p,g,Ne]),_.useEffect(()=>{u&&!C.isClosePausedRef.current&&Ne($)},[u,$,C.isClosePausedRef,Ne]),_.useEffect(()=>(oe(),()=>ce()),[oe,ce]);const Ee=_.useMemo(()=>x?Pg(x):null,[x]);return C.viewport?m.jsxs(m.Fragment,{children:[Ee&&m.jsx(kx,{__scopeToast:s,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:Ee}),m.jsx(_x,{scope:s,onClose:Se,children:Zc.createPortal(m.jsx(rd.ItemSlot,{scope:s,children:m.jsx(rx,{asChild:!0,onEscapeKeyDown:Dt(h,()=>{C.isFocusedToastEscapeKeyDownRef.current||Se(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(En.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":C.swipeDirection,...D,ref:L,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Dt(n.onKeyDown,J=>{J.key==="Escape"&&(h==null||h(J.nativeEvent),J.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,Se()))}),onPointerDown:Dt(n.onPointerDown,J=>{J.button===0&&(T.current={x:J.clientX,y:J.clientY})}),onPointerMove:Dt(n.onPointerMove,J=>{if(!T.current)return;const be=J.clientX-T.current.x,_e=J.clientY-T.current.y,Ce=!!A.current,K=["left","right"].includes(C.swipeDirection),ae=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,U=K?ae(0,be):0,P=K?0:ae(0,_e),z=J.pointerType==="touch"?10:2,de={x:U,y:P},ge={originalEvent:J,delta:de};Ce?(A.current=de,Ra(xx,w,ge,{discrete:!1})):Lp(de,C.swipeDirection,z)?(A.current=de,Ra(wx,v,ge,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(be)>z||Math.abs(_e)>z)&&(T.current=null)}),onPointerUp:Dt(n.onPointerUp,J=>{const be=A.current,_e=J.target;if(_e.hasPointerCapture(J.pointerId)&&_e.releasePointerCapture(J.pointerId),A.current=null,T.current=null,be){const Ce=J.currentTarget,K={originalEvent:J,delta:be};Lp(be,C.swipeDirection,C.swipeThreshold)?Ra(Sx,j,K,{discrete:!0}):Ra(Ex,b,K,{discrete:!0}),Ce.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),kx=n=>{const{__scopeToast:t,children:s,...i}=n,a=Xa(ao,t),[u,d]=_.useState(!1),[h,p]=_.useState(!1);return Nx(()=>d(!0)),_.useEffect(()=>{const g=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(g)},[]),h?null:m.jsx(gg,{asChild:!0,children:m.jsx(td,{...i,children:u&&m.jsxs(m.Fragment,{children:[a.label," ",s]})})})},Rx="ToastTitle",bg=_.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n;return m.jsx(En.div,{...i,ref:t})});bg.displayName=Rx;var Tx="ToastDescription",Cg=_.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n;return m.jsx(En.div,{...i,ref:t})});Cg.displayName=Tx;var kg="ToastAction",Rg=_.forwardRef((n,t)=>{const{altText:s,...i}=n;return s.trim()?m.jsx(Ng,{altText:s,asChild:!0,children:m.jsx(sd,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${kg}\`. Expected non-empty \`string\`.`),null)});Rg.displayName=kg;var Tg="ToastClose",sd=_.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n,a=bx(Tg,s);return m.jsx(Ng,{asChild:!0,children:m.jsx(En.button,{type:"button",...i,ref:t,onClick:Dt(n.onClick,a.onClose)})})});sd.displayName=Tg;var Ng=_.forwardRef((n,t)=>{const{__scopeToast:s,altText:i,...a}=n;return m.jsx(En.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...a,ref:t})});function Pg(n){const t=[];return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),Px(i)){const a=i.ariaHidden||i.hidden||i.style.display==="none",u=i.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=i.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Pg(i))}}),t}function Ra(n,t,s,{discrete:i}){const a=s.originalEvent.currentTarget,u=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),i?dg(a,u):a.dispatchEvent(u)}var Lp=(n,t,s=0)=>{const i=Math.abs(n.x),a=Math.abs(n.y),u=i>a;return t==="left"||t==="right"?u&&i>s:!u&&a>s};function Nx(n=()=>{}){const t=ts(n);Xi(()=>{let s=0,i=0;return s=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(i)}},[t])}function Px(n){return n.nodeType===n.ELEMENT_NODE}function Ox(n){const t=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function ec(n){const t=document.activeElement;return n.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Ax=wg,Og=Eg,Ag=_g,jg=bg,Lg=Cg,Ig=Rg,Fg=sd;function Dg(n){var t,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(t=0;ttypeof n=="boolean"?`${n}`:n===0?"0":n,Fp=Mg,jx=(n,t)=>s=>{var i;if((t==null?void 0:t.variants)==null)return Fp(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(g=>{const v=s==null?void 0:s[g],w=u==null?void 0:u[g];if(v===null)return null;const b=Ip(v)||Ip(w);return a[g][b]}),h=s&&Object.entries(s).reduce((g,v)=>{let[w,b]=v;return b===void 0||(g[w]=b),g},{}),p=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((g,v)=>{let{class:w,className:b,...j}=v;return Object.entries(j).every(D=>{let[C,x]=D;return Array.isArray(x)?x.includes({...u,...h}[C]):{...u,...h}[C]===x})?[...g,w,b]:g},[]);return Fp(n,d,p,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lx=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ug=(...n)=>n.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ix={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fx=_.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:a="",children:u,iconNode:d,...h},p)=>_.createElement("svg",{ref:p,...Ix,width:t,height:t,stroke:n,strokeWidth:i?Number(s)*24/Number(t):s,className:Ug("lucide",a),...h},[...d.map(([g,v])=>_.createElement(g,v)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ya=(n,t)=>{const s=_.forwardRef(({className:i,...a},u)=>_.createElement(Fx,{ref:u,iconNode:t,className:Ug(`lucide-${Lx(n)}`,i),...a}));return s.displayName=`${n}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],wc=Ya("ArrowRight",Dx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mx=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Ux=Ya("ArrowUpRight",Mx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zx=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Bx=Ya("Menu",zx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $x=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zg=Ya("X",$x),Vx=(n,t)=>{const s=new Array(n.length+t.length);for(let i=0;i({classGroupId:n,validator:t}),Bg=(n=new Map,t=null,s)=>({nextPart:n,validators:t,classGroupId:s}),Ha="-",Dp=[],Wx="arbitrary..",qx=n=>{const t=Kx(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return Qx(d);const h=d.split(Ha),p=h[0]===""&&h.length>1?1:0;return $g(h,p,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=i[d],g=s[d];return p?g?Vx(g,p):p:g||Dp}return s[d]||Dp}}},$g=(n,t,s)=>{if(n.length-t===0)return s.classGroupId;const a=n[t],u=s.nextPart.get(a);if(u){const g=$g(n,t+1,u);if(g)return g}const d=s.validators;if(d===null)return;const h=t===0?n.join(Ha):n.slice(t).join(Ha),p=d.length;for(let g=0;gn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=n.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?Wx+i:void 0})(),Kx=n=>{const{theme:t,classGroups:s}=n;return Gx(s,t)},Gx=(n,t)=>{const s=Bg();for(const i in n){const a=n[i];id(a,s,i,t)}return s},id=(n,t,s,i)=>{const a=n.length;for(let u=0;u{if(typeof n=="string"){Yx(n,t,s);return}if(typeof n=="function"){Jx(n,t,s,i);return}Zx(n,t,s,i)},Yx=(n,t,s)=>{const i=n===""?t:Vg(t,n);i.classGroupId=s},Jx=(n,t,s,i)=>{if(e1(n)){id(n(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(Hx(s,n))},Zx=(n,t,s,i)=>{const a=Object.entries(n),u=a.length;for(let d=0;d{let s=n;const i=t.split(Ha),a=i.length;for(let u=0;u"isThemeGetter"in n&&n.isThemeGetter===!0,t1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>n&&(t=0,i=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},xc="!",Mp=":",n1=[],Up=(n,t,s,i,a)=>({modifiers:n,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:a}),r1=n=>{const{prefix:t,experimentalParseClassName:s}=n;let i=a=>{const u=[];let d=0,h=0,p=0,g;const v=a.length;for(let C=0;Cp?g-p:void 0;return Up(u,j,b,D)};if(t){const a=t+Mp,u=i;i=d=>d.startsWith(a)?u(d.slice(a.length)):Up(n1,!1,d,void 0,!0)}if(s){const a=i;i=u=>s({className:u,parseClassName:a})}return i},s1=n=>{const t=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let a=[];for(let u=0;u0&&(a.sort(),i.push(...a),a=[]),i.push(d)):a.push(d)}return a.length>0&&(a.sort(),i.push(...a)),i}},i1=n=>({cache:t1(n.cacheSize),parseClassName:r1(n),sortModifiers:s1(n),...qx(n)}),o1=/\s+/,a1=(n,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],h=n.trim().split(o1);let p="";for(let g=h.length-1;g>=0;g-=1){const v=h[g],{isExternal:w,modifiers:b,hasImportantModifier:j,baseClassName:D,maybePostfixModifierPosition:C}=s(v);if(w){p=v+(p.length>0?" "+p:p);continue}let x=!!C,S=i(x?D.substring(0,C):D);if(!S){if(!x){p=v+(p.length>0?" "+p:p);continue}if(S=i(D),!S){p=v+(p.length>0?" "+p:p);continue}x=!1}const L=b.length===0?"":b.length===1?b[0]:u(b).join(":"),T=j?L+xc:L,A=T+S;if(d.indexOf(A)>-1)continue;d.push(A);const $=a(S,x);for(let V=0;V<$.length;++V){const G=$[V];d.push(T+G)}p=v+(p.length>0?" "+p:p)}return p},l1=(...n)=>{let t=0,s,i,a="";for(;t{if(typeof n=="string")return n;let t,s="";for(let i=0;i{let s,i,a,u;const d=p=>{const g=t.reduce((v,w)=>w(v),n());return s=i1(g),i=s.cache.get,a=s.cache.set,u=h,h(p)},h=p=>{const g=i(p);if(g)return g;const v=a1(p,s);return a(p,v),v};return u=d,(...p)=>u(l1(...p))},c1=[],tt=n=>{const t=s=>s[n]||c1;return t.isThemeGetter=!0,t},Wg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,d1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,f1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,p1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,m1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,or=n=>d1.test(n),ke=n=>!!n&&!Number.isNaN(Number(n)),ar=n=>!!n&&Number.isInteger(Number(n)),tc=n=>n.endsWith("%")&&ke(n.slice(0,-1)),On=n=>f1.test(n),Qg=()=>!0,y1=n=>h1.test(n)&&!p1.test(n),od=()=>!1,v1=n=>m1.test(n),w1=n=>g1.test(n),x1=n=>!re(n)&&!se(n),E1=n=>Er(n,Xg,od),re=n=>Wg.test(n),Fr=n=>Er(n,Yg,y1),zp=n=>Er(n,N1,ke),S1=n=>Er(n,Zg,Qg),_1=n=>Er(n,Jg,od),Bp=n=>Er(n,Kg,od),b1=n=>Er(n,Gg,w1),Ta=n=>Er(n,ey,v1),se=n=>qg.test(n),Mi=n=>is(n,Yg),C1=n=>is(n,Jg),$p=n=>is(n,Kg),k1=n=>is(n,Xg),R1=n=>is(n,Gg),Na=n=>is(n,ey,!0),T1=n=>is(n,Zg,!0),Er=(n,t,s)=>{const i=Wg.exec(n);return i?i[1]?t(i[1]):s(i[2]):!1},is=(n,t,s=!1)=>{const i=qg.exec(n);return i?i[1]?t(i[1]):s:!1},Kg=n=>n==="position"||n==="percentage",Gg=n=>n==="image"||n==="url",Xg=n=>n==="length"||n==="size"||n==="bg-size",Yg=n=>n==="length",N1=n=>n==="number",Jg=n=>n==="family-name",Zg=n=>n==="number"||n==="weight",ey=n=>n==="shadow",P1=()=>{const n=tt("color"),t=tt("font"),s=tt("text"),i=tt("font-weight"),a=tt("tracking"),u=tt("leading"),d=tt("breakpoint"),h=tt("container"),p=tt("spacing"),g=tt("radius"),v=tt("shadow"),w=tt("inset-shadow"),b=tt("text-shadow"),j=tt("drop-shadow"),D=tt("blur"),C=tt("perspective"),x=tt("aspect"),S=tt("ease"),L=tt("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...A(),se,re],V=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],B=()=>[se,re,p],oe=()=>[or,"full","auto",...B()],ce=()=>[ar,"none","subgrid",se,re],Se=()=>["auto",{span:["full",ar,se,re]},ar,se,re],Ne=()=>[ar,"auto",se,re],Ee=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],be=()=>["start","end","center","stretch","center-safe","end-safe"],_e=()=>["auto",...B()],Ce=()=>[or,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],K=()=>[or,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ae=()=>[or,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],U=()=>[n,se,re],P=()=>[...A(),$p,Bp,{position:[se,re]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",k1,E1,{size:[se,re]}],ge=()=>[tc,Mi,Fr],pe=()=>["","none","full",g,se,re],X=()=>["",ke,Mi,Fr],we=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[ke,tc,$p,Bp],nt=()=>["","none",D,se,re],Mt=()=>["none",ke,se,re],at=()=>["none",ke,se,re],Xt=()=>[ke,se,re],Ut=()=>[or,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[On],breakpoint:[On],color:[Qg],container:[On],"drop-shadow":[On],ease:["in","out","in-out"],font:[x1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[On],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[On],shadow:[On],spacing:["px",ke],text:[On],"text-shadow":[On],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",or,re,se,x]}],container:["container"],columns:[{columns:[ke,re,se,h]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{"inset-s":oe(),start:oe()}],end:[{"inset-e":oe(),end:oe()}],"inset-bs":[{"inset-bs":oe()}],"inset-be":[{"inset-be":oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[ar,"auto",se,re]}],basis:[{basis:[or,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,or,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[ar,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ce()}],"col-start-end":[{col:Se()}],"col-start":[{"col-start":Ne()}],"col-end":[{"col-end":Ne()}],"grid-rows":[{"grid-rows":ce()}],"row-start-end":[{row:Se()}],"row-start":[{"row-start":Ne()}],"row-end":[{"row-end":Ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ee()}],"auto-rows":[{"auto-rows":Ee()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...be(),"normal"]}],"justify-self":[{"justify-self":["auto",...be()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...be(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...be(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...be(),"baseline"]}],"place-self":[{"place-self":["auto",...be()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:_e()}],mx:[{mx:_e()}],my:[{my:_e()}],ms:[{ms:_e()}],me:[{me:_e()}],mbs:[{mbs:_e()}],mbe:[{mbe:_e()}],mt:[{mt:_e()}],mr:[{mr:_e()}],mb:[{mb:_e()}],ml:[{ml:_e()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ce()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",...Ce()]}],"min-w":[{"min-w":[h,"screen","none",...Ce()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...Ce()]}],h:[{h:["screen","lh",...Ce()]}],"min-h":[{"min-h":["screen","lh","none",...Ce()]}],"max-h":[{"max-h":["screen","lh",...Ce()]}],"font-size":[{text:["base",s,Mi,Fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,T1,S1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tc,re]}],"font-family":[{font:[C1,_1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,zp]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,Fr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ar,se,re],radial:["",se,re],conic:[ar,se,re]},R1,b1]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,Mi,Fr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",v,Na,Ta]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",w,Na,Ta]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[ke,Fr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",b,Na,Ta]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:nt()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",j,Na,Ta]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":nt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",S,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",L,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,se,re]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:Mt()}],"rotate-x":[{"rotate-x":Mt()}],"rotate-y":[{"rotate-y":Mt()}],"rotate-z":[{"rotate-z":Mt()}],scale:[{scale:at()}],"scale-x":[{"scale-x":at()}],"scale-y":[{"scale-y":at()}],"scale-z":[{"scale-z":at()}],"scale-3d":["scale-3d"],skew:[{skew:Xt()}],"skew-x":[{"skew-x":Xt()}],"skew-y":[{"skew-y":Xt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[ke,Mi,Fr,zp]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},O1=u1(P1);function Sr(...n){return O1(Mg(n))}const A1=Ax,ty=_.forwardRef(({className:n,...t},s)=>m.jsx(Og,{ref:s,className:Sr("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",n),...t}));ty.displayName=Og.displayName;const j1=jx("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ny=_.forwardRef(({className:n,variant:t,...s},i)=>m.jsx(Ag,{ref:i,className:Sr(j1({variant:t}),n),...s}));ny.displayName=Ag.displayName;const L1=_.forwardRef(({className:n,...t},s)=>m.jsx(Ig,{ref:s,className:Sr("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...t}));L1.displayName=Ig.displayName;const ry=_.forwardRef(({className:n,...t},s)=>m.jsx(Fg,{ref:s,className:Sr("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...t,children:m.jsx(zg,{className:"h-4 w-4"})}));ry.displayName=Fg.displayName;const sy=_.forwardRef(({className:n,...t},s)=>m.jsx(jg,{ref:s,className:Sr("text-sm font-semibold",n),...t}));sy.displayName=jg.displayName;const iy=_.forwardRef(({className:n,...t},s)=>m.jsx(Lg,{ref:s,className:Sr("text-sm opacity-90",n),...t}));iy.displayName=Lg.displayName;function I1(){const{toasts:n}=Lw();return m.jsxs(A1,{children:[n.map(function({id:t,title:s,description:i,action:a,...u}){return m.jsxs(ny,{...u,children:[m.jsxs("div",{className:"grid gap-1",children:[s&&m.jsx(sy,{children:s}),i&&m.jsx(iy,{children:i})]}),a,m.jsx(ry,{})]},t)}),m.jsx(ty,{})]})}var lo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},F1={setTimeout:(n,t)=>setTimeout(n,t),clearTimeout:n=>clearTimeout(n),setInterval:(n,t)=>setInterval(n,t),clearInterval:n=>clearInterval(n)},ur,Xc,Ym,D1=(Ym=class{constructor(){me(this,ur,F1);me(this,Xc,!1)}setTimeoutProvider(n){ee(this,ur,n)}setTimeout(n,t){return R(this,ur).setTimeout(n,t)}clearTimeout(n){R(this,ur).clearTimeout(n)}setInterval(n,t){return R(this,ur).setInterval(n,t)}clearInterval(n){R(this,ur).clearInterval(n)}},ur=new WeakMap,Xc=new WeakMap,Ym),Br=new D1;function M1(n){setTimeout(n,0)}var ns=typeof window>"u"||"Deno"in globalThis;function Ot(){}function U1(n,t){return typeof n=="function"?n(t):n}function Ec(n){return typeof n=="number"&&n>=0&&n!==1/0}function oy(n,t){return Math.max(n+(t||0)-Date.now(),0)}function vr(n,t){return typeof n=="function"?n(t):n}function Kt(n,t){return typeof n=="function"?n(t):n}function Vp(n,t){const{type:s="all",exact:i,fetchStatus:a,predicate:u,queryKey:d,stale:h}=n;if(d){if(i){if(t.queryHash!==ad(d,t.options))return!1}else if(!Ji(t.queryKey,d))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||a&&a!==t.state.fetchStatus||u&&!u(t))}function Hp(n,t){const{exact:s,status:i,predicate:a,mutationKey:u}=n;if(u){if(!t.options.mutationKey)return!1;if(s){if(Yi(t.options.mutationKey)!==Yi(u))return!1}else if(!Ji(t.options.mutationKey,u))return!1}return!(i&&t.state.status!==i||a&&!a(t))}function ad(n,t){return((t==null?void 0:t.queryKeyHashFn)||Yi)(n)}function Yi(n){return JSON.stringify(n,(t,s)=>_c(s)?Object.keys(s).sort().reduce((i,a)=>(i[a]=s[a],i),{}):s)}function Ji(n,t){return n===t?!0:typeof n!=typeof t?!1:n&&t&&typeof n=="object"&&typeof t=="object"?Object.keys(t).every(s=>Ji(n[s],t[s])):!1}var z1=Object.prototype.hasOwnProperty;function ay(n,t,s=0){if(n===t)return n;if(s>500)return t;const i=Wp(n)&&Wp(t);if(!i&&!(_c(n)&&_c(t)))return t;const u=(i?n:Object.keys(n)).length,d=i?t:Object.keys(t),h=d.length,p=i?new Array(h):{};let g=0;for(let v=0;v{Br.setTimeout(t,n)})}function bc(n,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,t):s.structuralSharing!==!1?ay(n,t):t}function $1(n,t,s=0){const i=[...n,t];return s&&i.length>s?i.slice(1):i}function V1(n,t,s=0){const i=[t,...n];return s&&i.length>s?i.slice(0,-1):i}var ld=Symbol();function ly(n,t){return!n.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!n.queryFn||n.queryFn===ld?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function uy(n,t){return typeof n=="function"?n(...t):!!n}function H1(n,t,s){let i=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=t()),i||(i=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var Vr,cr,Ls,Jm,W1=(Jm=class extends lo{constructor(){super();me(this,Vr);me(this,cr);me(this,Ls);ee(this,Ls,t=>{if(!ns&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,cr)||this.setEventListener(R(this,Ls))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,cr))==null||t.call(this),ee(this,cr,void 0))}setEventListener(t){var s;ee(this,Ls,t),(s=R(this,cr))==null||s.call(this),ee(this,cr,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){R(this,Vr)!==t&&(ee(this,Vr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,Vr)=="boolean"?R(this,Vr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Vr=new WeakMap,cr=new WeakMap,Ls=new WeakMap,Jm),ud=new W1;function Cc(){let n,t;const s=new Promise((a,u)=>{n=a,t=u});s.status="pending",s.catch(()=>{});function i(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{i({status:"fulfilled",value:a}),n(a)},s.reject=a=>{i({status:"rejected",reason:a}),t(a)},s}var q1=M1;function Q1(){let n=[],t=0,s=h=>{h()},i=h=>{h()},a=q1;const u=h=>{t?n.push(h):a(()=>{s(h)})},d=()=>{const h=n;n=[],h.length&&a(()=>{i(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||d()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{a=h}}}var ft=Q1(),Is,dr,Fs,Zm,K1=(Zm=class extends lo{constructor(){super();me(this,Is,!0);me(this,dr);me(this,Fs);ee(this,Fs,t=>{if(!ns&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){R(this,dr)||this.setEventListener(R(this,Fs))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,dr))==null||t.call(this),ee(this,dr,void 0))}setEventListener(t){var s;ee(this,Fs,t),(s=R(this,dr))==null||s.call(this),ee(this,dr,t(this.setOnline.bind(this)))}setOnline(t){R(this,Is)!==t&&(ee(this,Is,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return R(this,Is)}},Is=new WeakMap,dr=new WeakMap,Fs=new WeakMap,Zm),Wa=new K1;function G1(n){return Math.min(1e3*2**n,3e4)}function cy(n){return(n??"online")==="online"?Wa.isOnline():!0}var kc=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function dy(n){let t=!1,s=0,i;const a=Cc(),u=()=>a.status!=="pending",d=C=>{var x;if(!u()){const S=new kc(C);b(S),(x=n.onCancel)==null||x.call(n,S)}},h=()=>{t=!0},p=()=>{t=!1},g=()=>ud.isFocused()&&(n.networkMode==="always"||Wa.isOnline())&&n.canRun(),v=()=>cy(n.networkMode)&&n.canRun(),w=C=>{u()||(i==null||i(),a.resolve(C))},b=C=>{u()||(i==null||i(),a.reject(C))},j=()=>new Promise(C=>{var x;i=S=>{(u()||g())&&C(S)},(x=n.onPause)==null||x.call(n)}).then(()=>{var C;i=void 0,u()||(C=n.onContinue)==null||C.call(n)}),D=()=>{if(u())return;let C;const x=s===0?n.initialPromise:void 0;try{C=x??n.fn()}catch(S){C=Promise.reject(S)}Promise.resolve(C).then(w).catch(S=>{var V;if(u())return;const L=n.retry??(ns?0:3),T=n.retryDelay??G1,A=typeof T=="function"?T(s,S):T,$=L===!0||typeof L=="number"&&sg()?void 0:j()).then(()=>{t?b(S):D()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(i==null||i(),a),cancelRetry:h,continueRetry:p,canStart:v,start:()=>(v()?D():j().then(D),a)}}var Hr,eg,fy=(eg=class{constructor(){me(this,Hr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ec(this.gcTime)&&ee(this,Hr,Br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ns?1/0:300*1e3))}clearGcTimeout(){R(this,Hr)&&(Br.clearTimeout(R(this,Hr)),ee(this,Hr,void 0))}},Hr=new WeakMap,eg),Wr,Ds,Qt,qr,ot,no,Qr,an,An,tg,X1=(tg=class extends fy{constructor(t){super();me(this,an);me(this,Wr);me(this,Ds);me(this,Qt);me(this,qr);me(this,ot);me(this,no);me(this,Qr);ee(this,Qr,!1),ee(this,no,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,qr,t.client),ee(this,Qt,R(this,qr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Wr,Kp(this.options)),this.state=t.state??R(this,Wr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,ot))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,no),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Kp(this.options);s.data!==void 0&&(this.setState(Qp(s.data,s.dataUpdatedAt)),ee(this,Wr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Qt).remove(this)}setData(t,s){const i=bc(this.state.data,t,this.options);return Pe(this,an,An).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(t,s){Pe(this,an,An).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var i,a;const s=(i=R(this,ot))==null?void 0:i.promise;return(a=R(this,ot))==null||a.cancel(t),s?s.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Wr))}isActive(){return this.observers.some(t=>Kt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ld||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!oy(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}onOnline(){var s;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Qt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(R(this,ot)&&(R(this,Qr)?R(this,ot).cancel({revert:!0}):R(this,ot).cancelRetry()),this.scheduleGc()),R(this,Qt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,an,An).call(this,{type:"invalidate"})}async fetch(t,s){var p,g,v,w,b,j,D,C,x,S,L,T;if(this.state.fetchStatus!=="idle"&&((p=R(this,ot))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,ot))return R(this,ot).continueRetry(),R(this,ot).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find($=>$.options.queryFn);A&&this.setOptions(A.options)}const i=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ee(this,Qr,!0),i.signal)})},u=()=>{const A=ly(this.options,s),V=(()=>{const G={client:R(this,qr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,Qr,!1),this.options.persister?this.options.persister(A,V,this):A(V)},h=(()=>{const A={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,qr),state:this.state,fetchFn:u};return a(A),A})();(g=this.options.behavior)==null||g.onFetch(h,this),ee(this,Ds,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Pe(this,an,An).call(this,{type:"fetch",meta:(w=h.fetchOptions)==null?void 0:w.meta}),ee(this,ot,dy({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:A=>{A instanceof kc&&A.revert&&this.setState({...R(this,Ds),fetchStatus:"idle"}),i.abort()},onFail:(A,$)=>{Pe(this,an,An).call(this,{type:"failed",failureCount:A,error:$})},onPause:()=>{Pe(this,an,An).call(this,{type:"pause"})},onContinue:()=>{Pe(this,an,An).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const A=await R(this,ot).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(j=(b=R(this,Qt).config).onSuccess)==null||j.call(b,A,this),(C=(D=R(this,Qt).config).onSettled)==null||C.call(D,A,this.state.error,this),A}catch(A){if(A instanceof kc){if(A.silent)return R(this,ot).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Pe(this,an,An).call(this,{type:"error",error:A}),(S=(x=R(this,Qt).config).onError)==null||S.call(x,A,this),(T=(L=R(this,Qt).config).onSettled)==null||T.call(L,this.state.data,A,this),A}finally{this.scheduleGc()}}},Wr=new WeakMap,Ds=new WeakMap,Qt=new WeakMap,qr=new WeakMap,ot=new WeakMap,no=new WeakMap,Qr=new WeakMap,an=new WeakSet,An=function(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...hy(i.data,this.options),fetchMeta:t.meta??null};case"success":const a={...i,...Qp(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Ds,t.manual?a:void 0),a;case"error":const u=t.error;return{...i,error:u,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),ft.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),R(this,Qt).notify({query:this,type:"updated",action:t})})},tg);function hy(n,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cy(t.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Qp(n,t){return{data:n,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Kp(n){const t=typeof n.initialData=="function"?n.initialData():n.initialData,s=t!==void 0,i=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pt,Oe,ro,_t,Kr,Ms,In,fr,so,Us,zs,Gr,Xr,hr,Bs,Fe,Vi,Rc,Tc,Nc,Pc,Oc,Ac,jc,py,ng,Y1=(ng=class extends lo{constructor(t,s){super();me(this,Fe);me(this,Pt);me(this,Oe);me(this,ro);me(this,_t);me(this,Kr);me(this,Ms);me(this,In);me(this,fr);me(this,so);me(this,Us);me(this,zs);me(this,Gr);me(this,Xr);me(this,hr);me(this,Bs,new Set);this.options=s,ee(this,Pt,t),ee(this,fr,null),ee(this,In,Cc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Oe).addObserver(this),Gp(R(this,Oe),this.options)?Pe(this,Fe,Vi).call(this):this.updateResult(),Pe(this,Fe,Pc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lc(R(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lc(R(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,Fe,Oc).call(this),Pe(this,Fe,Ac).call(this),R(this,Oe).removeObserver(this)}setOptions(t){const s=this.options,i=R(this,Oe);if(this.options=R(this,Pt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kt(this.options.enabled,R(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,Fe,jc).call(this),R(this,Oe).setOptions(this.options),s._defaulted&&!Sc(this.options,s)&&R(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Oe),observer:this});const a=this.hasListeners();a&&Xp(R(this,Oe),i,this.options,s)&&Pe(this,Fe,Vi).call(this),this.updateResult(),a&&(R(this,Oe)!==i||Kt(this.options.enabled,R(this,Oe))!==Kt(s.enabled,R(this,Oe))||vr(this.options.staleTime,R(this,Oe))!==vr(s.staleTime,R(this,Oe)))&&Pe(this,Fe,Rc).call(this);const u=Pe(this,Fe,Tc).call(this);a&&(R(this,Oe)!==i||Kt(this.options.enabled,R(this,Oe))!==Kt(s.enabled,R(this,Oe))||u!==R(this,hr))&&Pe(this,Fe,Nc).call(this,u)}getOptimisticResult(t){const s=R(this,Pt).getQueryCache().build(R(this,Pt),t),i=this.createResult(s,t);return Z1(this,i)&&(ee(this,_t,i),ee(this,Ms,this.options),ee(this,Kr,R(this,Oe).state)),i}getCurrentResult(){return R(this,_t)}trackResult(t,s){return new Proxy(t,{get:(i,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,In).status==="pending"&&R(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,a))})}trackProp(t){R(this,Bs).add(t)}getCurrentQuery(){return R(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,Pt).defaultQueryOptions(t),i=R(this,Pt).getQueryCache().build(R(this,Pt),s);return i.fetch().then(()=>this.createResult(i,s))}fetch(t){return Pe(this,Fe,Vi).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,_t)))}createResult(t,s){var oe;const i=R(this,Oe),a=this.options,u=R(this,_t),d=R(this,Kr),h=R(this,Ms),g=t!==i?t.state:R(this,ro),{state:v}=t;let w={...v},b=!1,j;if(s._optimisticResults){const ce=this.hasListeners(),Se=!ce&&Gp(t,s),Ne=ce&&Xp(t,i,s,a);(Se||Ne)&&(w={...w,...hy(v.data,t.options)}),s._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:D,errorUpdatedAt:C,status:x}=w;j=w.data;let S=!1;if(s.placeholderData!==void 0&&j===void 0&&x==="pending"){let ce;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ce=u.data,S=!0):ce=typeof s.placeholderData=="function"?s.placeholderData((oe=R(this,zs))==null?void 0:oe.state.data,R(this,zs)):s.placeholderData,ce!==void 0&&(x="success",j=bc(u==null?void 0:u.data,ce,s),b=!0)}if(s.select&&j!==void 0&&!S)if(u&&j===(d==null?void 0:d.data)&&s.select===R(this,so))j=R(this,Us);else try{ee(this,so,s.select),j=s.select(j),j=bc(u==null?void 0:u.data,j,s),ee(this,Us,j),ee(this,fr,null)}catch(ce){ee(this,fr,ce)}R(this,fr)&&(D=R(this,fr),j=R(this,Us),C=Date.now(),x="error");const L=w.fetchStatus==="fetching",T=x==="pending",A=x==="error",$=T&&L,V=j!==void 0,B={status:x,fetchStatus:w.fetchStatus,isPending:T,isSuccess:x==="success",isError:A,isInitialLoading:$,isLoading:$,data:j,dataUpdatedAt:w.dataUpdatedAt,error:D,errorUpdatedAt:C,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>g.dataUpdateCount||w.errorUpdateCount>g.errorUpdateCount,isFetching:L,isRefetching:L&&!T,isLoadingError:A&&!V,isPaused:w.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:A&&V,isStale:cd(t,s),refetch:this.refetch,promise:R(this,In),isEnabled:Kt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ce=B.data!==void 0,Se=B.status==="error"&&!ce,Ne=be=>{Se?be.reject(B.error):ce&&be.resolve(B.data)},Ee=()=>{const be=ee(this,In,B.promise=Cc());Ne(be)},J=R(this,In);switch(J.status){case"pending":t.queryHash===i.queryHash&&Ne(J);break;case"fulfilled":(Se||B.data!==J.value)&&Ee();break;case"rejected":(!Se||B.error!==J.reason)&&Ee();break}}return B}updateResult(){const t=R(this,_t),s=this.createResult(R(this,Oe),this.options);if(ee(this,Kr,R(this,Oe).state),ee(this,Ms,this.options),R(this,Kr).data!==void 0&&ee(this,zs,R(this,Oe)),Sc(s,t))return;ee(this,_t,s);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!R(this,Bs).size)return!0;const d=new Set(u??R(this,Bs));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,_t)).some(h=>{const p=h;return R(this,_t)[p]!==t[p]&&d.has(p)})};Pe(this,Fe,py).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,Fe,Pc).call(this)}},Pt=new WeakMap,Oe=new WeakMap,ro=new WeakMap,_t=new WeakMap,Kr=new WeakMap,Ms=new WeakMap,In=new WeakMap,fr=new WeakMap,so=new WeakMap,Us=new WeakMap,zs=new WeakMap,Gr=new WeakMap,Xr=new WeakMap,hr=new WeakMap,Bs=new WeakMap,Fe=new WeakSet,Vi=function(t){Pe(this,Fe,jc).call(this);let s=R(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Ot)),s},Rc=function(){Pe(this,Fe,Oc).call(this);const t=vr(this.options.staleTime,R(this,Oe));if(ns||R(this,_t).isStale||!Ec(t))return;const i=oy(R(this,_t).dataUpdatedAt,t)+1;ee(this,Gr,Br.setTimeout(()=>{R(this,_t).isStale||this.updateResult()},i))},Tc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Oe)):this.options.refetchInterval)??!1},Nc=function(t){Pe(this,Fe,Ac).call(this),ee(this,hr,t),!(ns||Kt(this.options.enabled,R(this,Oe))===!1||!Ec(R(this,hr))||R(this,hr)===0)&&ee(this,Xr,Br.setInterval(()=>{(this.options.refetchIntervalInBackground||ud.isFocused())&&Pe(this,Fe,Vi).call(this)},R(this,hr)))},Pc=function(){Pe(this,Fe,Rc).call(this),Pe(this,Fe,Nc).call(this,Pe(this,Fe,Tc).call(this))},Oc=function(){R(this,Gr)&&(Br.clearTimeout(R(this,Gr)),ee(this,Gr,void 0))},Ac=function(){R(this,Xr)&&(Br.clearInterval(R(this,Xr)),ee(this,Xr,void 0))},jc=function(){const t=R(this,Pt).getQueryCache().build(R(this,Pt),this.options);if(t===R(this,Oe))return;const s=R(this,Oe);ee(this,Oe,t),ee(this,ro,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},py=function(t){ft.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(R(this,_t))}),R(this,Pt).getQueryCache().notify({query:R(this,Oe),type:"observerResultsUpdated"})})},ng);function J1(n,t){return Kt(t.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&t.retryOnMount===!1)}function Gp(n,t){return J1(n,t)||n.state.data!==void 0&&Lc(n,t,t.refetchOnMount)}function Lc(n,t,s){if(Kt(t.enabled,n)!==!1&&vr(t.staleTime,n)!=="static"){const i=typeof s=="function"?s(n):s;return i==="always"||i!==!1&&cd(n,t)}return!1}function Xp(n,t,s,i){return(n!==t||Kt(i.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&cd(n,s)}function cd(n,t){return Kt(t.enabled,n)!==!1&&n.isStaleByTime(vr(t.staleTime,n))}function Z1(n,t){return!Sc(n.getCurrentResult(),t)}function Yp(n){return{onFetch:(t,s)=>{var v,w,b,j,D;const i=t.options,a=(b=(w=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:w.fetchMore)==null?void 0:b.direction,u=((j=t.state.data)==null?void 0:j.pages)||[],d=((D=t.state.data)==null?void 0:D.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const g=async()=>{let C=!1;const x=T=>{H1(T,()=>t.signal,()=>C=!0)},S=ly(t.options,t.fetchOptions),L=async(T,A,$)=>{if(C)return Promise.reject();if(A==null&&T.pages.length)return Promise.resolve(T);const G=(()=>{const Se={client:t.client,queryKey:t.queryKey,pageParam:A,direction:$?"backward":"forward",meta:t.options.meta};return x(Se),Se})(),B=await S(G),{maxPages:oe}=t.options,ce=$?V1:$1;return{pages:ce(T.pages,B,oe),pageParams:ce(T.pageParams,A,oe)}};if(a&&u.length){const T=a==="backward",A=T?eE:Jp,$={pages:u,pageParams:d},V=A(i,$);h=await L($,V,T)}else{const T=n??u.length;do{const A=p===0?d[0]??i.initialPageParam:Jp(i,h);if(p>0&&A==null)break;h=await L(h,A),p++}while(p{var C,x;return(x=(C=t.options).persister)==null?void 0:x.call(C,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=g}}}function Jp(n,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?n.getNextPageParam(t[i],t,s[i],s):void 0}function eE(n,{pages:t,pageParams:s}){var i;return t.length>0?(i=n.getPreviousPageParam)==null?void 0:i.call(n,t[0],t,s[0],s):void 0}var io,gn,wt,Yr,yn,lr,rg,tE=(rg=class extends fy{constructor(t){super();me(this,yn);me(this,io);me(this,gn);me(this,wt);me(this,Yr);ee(this,io,t.client),this.mutationId=t.mutationId,ee(this,wt,t.mutationCache),ee(this,gn,[]),this.state=t.state||nE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,gn).includes(t)||(R(this,gn).push(t),this.clearGcTimeout(),R(this,wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,gn,R(this,gn).filter(s=>s!==t)),this.scheduleGc(),R(this,wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,gn).length||(this.state.status==="pending"?this.scheduleGc():R(this,wt).remove(this))}continue(){var t;return((t=R(this,Yr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,p,g,v,w,b,j,D,C,x,S,L,T,A,$,V,G;const s=()=>{Pe(this,yn,lr).call(this,{type:"continue"})},i={client:R(this,io),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Yr,dy({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(B,oe)=>{Pe(this,yn,lr).call(this,{type:"failed",failureCount:B,error:oe})},onPause:()=>{Pe(this,yn,lr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,wt).canRun(this)}));const a=this.state.status==="pending",u=!R(this,Yr).canStart();try{if(a)s();else{Pe(this,yn,lr).call(this,{type:"pending",variables:t,isPaused:u}),R(this,wt).config.onMutate&&await R(this,wt).config.onMutate(t,this,i);const oe=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,i));oe!==this.state.context&&Pe(this,yn,lr).call(this,{type:"pending",context:oe,variables:t,isPaused:u})}const B=await R(this,Yr).start();return await((g=(p=R(this,wt).config).onSuccess)==null?void 0:g.call(p,B,t,this.state.context,this,i)),await((w=(v=this.options).onSuccess)==null?void 0:w.call(v,B,t,this.state.context,i)),await((j=(b=R(this,wt).config).onSettled)==null?void 0:j.call(b,B,null,this.state.variables,this.state.context,this,i)),await((C=(D=this.options).onSettled)==null?void 0:C.call(D,B,null,t,this.state.context,i)),Pe(this,yn,lr).call(this,{type:"success",data:B}),B}catch(B){try{await((S=(x=R(this,wt).config).onError)==null?void 0:S.call(x,B,t,this.state.context,this,i))}catch(oe){Promise.reject(oe)}try{await((T=(L=this.options).onError)==null?void 0:T.call(L,B,t,this.state.context,i))}catch(oe){Promise.reject(oe)}try{await(($=(A=R(this,wt).config).onSettled)==null?void 0:$.call(A,void 0,B,this.state.variables,this.state.context,this,i))}catch(oe){Promise.reject(oe)}try{await((G=(V=this.options).onSettled)==null?void 0:G.call(V,void 0,B,t,this.state.context,i))}catch(oe){Promise.reject(oe)}throw Pe(this,yn,lr).call(this,{type:"error",error:B}),B}finally{R(this,wt).runNext(this)}}},io=new WeakMap,gn=new WeakMap,wt=new WeakMap,Yr=new WeakMap,yn=new WeakSet,lr=function(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ft.batch(()=>{R(this,gn).forEach(i=>{i.onMutationUpdate(t)}),R(this,wt).notify({mutation:this,type:"updated",action:t})})},rg);function nE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fn,ln,oo,sg,rE=(sg=class extends lo{constructor(t={}){super();me(this,Fn);me(this,ln);me(this,oo);this.config=t,ee(this,Fn,new Set),ee(this,ln,new Map),ee(this,oo,0)}build(t,s,i){const a=new tE({client:t,mutationCache:this,mutationId:++ba(this,oo)._,options:t.defaultMutationOptions(s),state:i});return this.add(a),a}add(t){R(this,Fn).add(t);const s=Pa(t);if(typeof s=="string"){const i=R(this,ln).get(s);i?i.push(t):R(this,ln).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Fn).delete(t)){const s=Pa(t);if(typeof s=="string"){const i=R(this,ln).get(s);if(i)if(i.length>1){const a=i.indexOf(t);a!==-1&&i.splice(a,1)}else i[0]===t&&R(this,ln).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Pa(t);if(typeof s=="string"){const i=R(this,ln).get(s),a=i==null?void 0:i.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var i;const s=Pa(t);if(typeof s=="string"){const a=(i=R(this,ln).get(s))==null?void 0:i.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ft.batch(()=>{R(this,Fn).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Fn).clear(),R(this,ln).clear()})}getAll(){return Array.from(R(this,Fn))}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Hp(s,i))}findAll(t={}){return this.getAll().filter(s=>Hp(t,s))}notify(t){ft.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ft.batch(()=>Promise.all(t.map(s=>s.continue().catch(Ot))))}},Fn=new WeakMap,ln=new WeakMap,oo=new WeakMap,sg);function Pa(n){var t;return(t=n.options.scope)==null?void 0:t.id}var vn,ig,sE=(ig=class extends lo{constructor(t={}){super();me(this,vn);this.config=t,ee(this,vn,new Map)}build(t,s,i){const a=s.queryKey,u=s.queryHash??ad(a,s);let d=this.get(u);return d||(d=new X1({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){R(this,vn).has(t.queryHash)||(R(this,vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=R(this,vn).get(t.queryHash);s&&(t.destroy(),s===t&&R(this,vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ft.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,vn).get(t)}getAll(){return[...R(this,vn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Vp(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>Vp(t,i)):s}notify(t){ft.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ft.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ft.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vn=new WeakMap,ig),qe,pr,mr,$s,Vs,gr,Hs,Ws,og,iE=(og=class{constructor(n={}){me(this,qe);me(this,pr);me(this,mr);me(this,$s);me(this,Vs);me(this,gr);me(this,Hs);me(this,Ws);ee(this,qe,n.queryCache||new sE),ee(this,pr,n.mutationCache||new rE),ee(this,mr,n.defaultOptions||{}),ee(this,$s,new Map),ee(this,Vs,new Map),ee(this,gr,0)}mount(){ba(this,gr)._++,R(this,gr)===1&&(ee(this,Hs,ud.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,qe).onFocus())})),ee(this,Ws,Wa.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,qe).onOnline())})))}unmount(){var n,t;ba(this,gr)._--,R(this,gr)===0&&((n=R(this,Hs))==null||n.call(this),ee(this,Hs,void 0),(t=R(this,Ws))==null||t.call(this),ee(this,Ws,void 0))}isFetching(n){return R(this,qe).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return R(this,pr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,qe).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const t=this.defaultQueryOptions(n),s=R(this,qe).build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(vr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(n){return R(this,qe).findAll(n).map(({queryKey:t,state:s})=>{const i=s.data;return[t,i]})}setQueryData(n,t,s){const i=this.defaultQueryOptions({queryKey:n}),a=R(this,qe).get(i.queryHash),u=a==null?void 0:a.state.data,d=U1(t,u);if(d!==void 0)return R(this,qe).build(this,i).setData(d,{...s,manual:!0})}setQueriesData(n,t,s){return ft.batch(()=>R(this,qe).findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,qe).get(t.queryHash))==null?void 0:s.state}removeQueries(n){const t=R(this,qe);ft.batch(()=>{t.findAll(n).forEach(s=>{t.remove(s)})})}resetQueries(n,t){const s=R(this,qe);return ft.batch(()=>(s.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},t)))}cancelQueries(n,t={}){const s={revert:!0,...t},i=ft.batch(()=>R(this,qe).findAll(n).map(a=>a.cancel(s)));return Promise.all(i).then(Ot).catch(Ot)}invalidateQueries(n,t={}){return ft.batch(()=>(R(this,qe).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},t)))}refetchQueries(n,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=ft.batch(()=>R(this,qe).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(Ot)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(Ot)}fetchQuery(n){const t=this.defaultQueryOptions(n);t.retry===void 0&&(t.retry=!1);const s=R(this,qe).build(this,t);return s.isStaleByTime(vr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ot).catch(Ot)}fetchInfiniteQuery(n){return n.behavior=Yp(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ot).catch(Ot)}ensureInfiniteQueryData(n){return n.behavior=Yp(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Wa.isOnline()?R(this,pr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,qe)}getMutationCache(){return R(this,pr)}getDefaultOptions(){return R(this,mr)}setDefaultOptions(n){ee(this,mr,n)}setQueryDefaults(n,t){R(this,$s).set(Yi(n),{queryKey:n,defaultOptions:t})}getQueryDefaults(n){const t=[...R(this,$s).values()],s={};return t.forEach(i=>{Ji(n,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(n,t){R(this,Vs).set(Yi(n),{mutationKey:n,defaultOptions:t})}getMutationDefaults(n){const t=[...R(this,Vs).values()],s={};return t.forEach(i=>{Ji(n,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const t={...R(this,mr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return t.queryHash||(t.queryHash=ad(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ld&&(t.enabled=!1),t}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...R(this,mr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){R(this,qe).clear(),R(this,pr).clear()}},qe=new WeakMap,pr=new WeakMap,mr=new WeakMap,$s=new WeakMap,Vs=new WeakMap,gr=new WeakMap,Hs=new WeakMap,Ws=new WeakMap,og),my=_.createContext(void 0),oE=n=>{const t=_.useContext(my);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},aE=({client:n,children:t})=>(_.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),m.jsx(my.Provider,{value:n,children:t})),gy=_.createContext(!1),lE=()=>_.useContext(gy);gy.Provider;function uE(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var cE=_.createContext(uE()),dE=()=>_.useContext(cE),fE=(n,t,s)=>{const i=s!=null&&s.state.error&&typeof n.throwOnError=="function"?uy(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||i)&&(t.isReset()||(n.retryOnMount=!1))},hE=n=>{_.useEffect(()=>{n.clearReset()},[n])},pE=({result:n,errorResetBoundary:t,throwOnError:s,query:i,suspense:a})=>n.isError&&!t.isReset()&&!n.isFetching&&i&&(a&&n.data===void 0||uy(s,[n.error,i])),mE=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...a)=>s(i(...a)):s(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},gE=(n,t)=>n.isLoading&&n.isFetching&&!t,yE=(n,t)=>(n==null?void 0:n.suspense)&&t.isPending,Zp=(n,t,s)=>t.fetchOptimistic(n).catch(()=>{s.clearReset()});function vE(n,t,s){var b,j,D,C;const i=lE(),a=dE(),u=oE(),d=u.defaultQueryOptions(n);(j=(b=u.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=i?"isRestoring":"optimistic",mE(d),fE(d,a,h),hE(a);const p=!u.getQueryCache().get(d.queryHash),[g]=_.useState(()=>new t(u,d)),v=g.getOptimisticResult(d),w=!i&&n.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(x=>{const S=w?g.subscribe(ft.batchCalls(x)):Ot;return g.updateResult(),S},[g,w]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),_.useEffect(()=>{g.setOptions(d)},[d,g]),yE(d,v))throw Zp(d,g,a);if(pE({result:v,errorResetBoundary:a,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw v.error;if((C=(D=u.getDefaultOptions().queries)==null?void 0:D._experimental_afterQuery)==null||C.call(D,d,v),d.experimental_prefetchInRender&&!ns&&gE(v,i)){const x=p?Zp(d,g,a):h==null?void 0:h.promise;x==null||x.catch(Ot).finally(()=>{g.updateResult()})}return d.notifyOnChangeProps?v:g.trackResult(v)}function wE(n,t){return vE(n,Y1)}const xE=new iE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Zi(){return Zi=Object.assign?Object.assign.bind():function(n){for(var t=1;t"u")throw new Error(t)}function dd(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function SE(){return Math.random().toString(36).substr(2,8)}function tm(n,t){return{usr:n.state,key:n.key,idx:t}}function Ic(n,t,s,i){return s===void 0&&(s=null),Zi({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof t=="string"?Ks(t):t,{state:s,key:t&&t.key||i||SE()})}function qa(n){let{pathname:t="/",search:s="",hash:i=""}=n;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Ks(n){let t={};if(n){let s=n.indexOf("#");s>=0&&(t.hash=n.substr(s),n=n.substr(0,s));let i=n.indexOf("?");i>=0&&(t.search=n.substr(i),n=n.substr(0,i)),n&&(t.pathname=n)}return t}function _E(n,t,s,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:u=!1}=i,d=a.history,h=yr.Pop,p=null,g=v();g==null&&(g=0,d.replaceState(Zi({},d.state,{idx:g}),""));function v(){return(d.state||{idx:null}).idx}function w(){h=yr.Pop;let x=v(),S=x==null?null:x-g;g=x,p&&p({action:h,location:C.location,delta:S})}function b(x,S){h=yr.Push;let L=Ic(C.location,x,S);g=v()+1;let T=tm(L,g),A=C.createHref(L);try{d.pushState(T,"",A)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;a.location.assign(A)}u&&p&&p({action:h,location:C.location,delta:1})}function j(x,S){h=yr.Replace;let L=Ic(C.location,x,S);g=v();let T=tm(L,g),A=C.createHref(L);d.replaceState(T,"",A),u&&p&&p({action:h,location:C.location,delta:0})}function D(x){let S=a.location.origin!=="null"?a.location.origin:a.location.href,L=typeof x=="string"?x:qa(x);return L=L.replace(/ $/,"%20"),Je(S,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,S)}let C={get action(){return h},get location(){return n(a,d)},listen(x){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(em,w),p=x,()=>{a.removeEventListener(em,w),p=null}},createHref(x){return t(a,x)},createURL:D,encodeLocation(x){let S=D(x);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:b,replace:j,go(x){return d.go(x)}};return C}var nm;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(nm||(nm={}));function bE(n,t,s){return s===void 0&&(s="/"),CE(n,t,s)}function CE(n,t,s,i){let a=typeof t=="string"?Ks(t):t,u=fd(a.pathname||"/",s);if(u==null)return null;let d=yy(n);kE(d);let h=null,p=ME(u);for(let g=0;h==null&&g{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Je(p.relativePath.startsWith(i),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(i.length));let g=wr([i,p.relativePath]),v=s.concat(p);u.children&&u.children.length>0&&(Je(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),yy(u.children,t,v,g)),!(u.path==null&&!u.index)&&t.push({path:g,score:jE(g,u.index),routesMeta:v})};return n.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))a(u,d);else for(let p of vy(u.path))a(u,d,p)}),t}function vy(n){let t=n.split("/");if(t.length===0)return[];let[s,...i]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(i.length===0)return a?[u,""]:[u];let d=vy(i.join("/")),h=[];return h.push(...d.map(p=>p===""?u:[u,p].join("/"))),a&&h.push(...d),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function kE(n){n.sort((t,s)=>t.score!==s.score?s.score-t.score:LE(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}const RE=/^:[\w-]+$/,TE=3,NE=2,PE=1,OE=10,AE=-2,rm=n=>n==="*";function jE(n,t){let s=n.split("/"),i=s.length;return s.some(rm)&&(i+=AE),t&&(i+=NE),s.filter(a=>!rm(a)).reduce((a,u)=>a+(RE.test(u)?TE:u===""?PE:OE),i)}function LE(n,t){return n.length===t.length&&n.slice(0,-1).every((i,a)=>i===t[a])?n[n.length-1]-t[t.length-1]:0}function IE(n,t,s){let{routesMeta:i}=n,a={},u="/",d=[];for(let h=0;h{let{paramName:b,isOptional:j}=v;if(b==="*"){let C=h[w]||"";d=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const D=h[w];return j&&!D?g[b]=void 0:g[b]=(D||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function DE(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),dd(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],a="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(i.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),a+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":n!==""&&n!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function ME(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dd(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),n}}function fd(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}const UE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zE=n=>UE.test(n);function BE(n,t){t===void 0&&(t="/");let{pathname:s,search:i="",hash:a=""}=typeof n=="string"?Ks(n):n,u;if(s)if(zE(s))u=s;else{if(s.includes("//")){let d=s;s=Ey(s),dd(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+s))}s.startsWith("/")?u=sm(s.substring(1),"/"):u=sm(s,t)}else u=t;return{pathname:u,search:HE(i),hash:WE(a)}}function sm(n,t){let s=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function nc(n,t,s,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function $E(n){return n.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function wy(n,t){let s=$E(n);return t?s.map((i,a)=>a===s.length-1?i.pathname:i.pathnameBase):s.map(i=>i.pathnameBase)}function xy(n,t,s,i){i===void 0&&(i=!1);let a;typeof n=="string"?a=Ks(n):(a=Zi({},n),Je(!a.pathname||!a.pathname.includes("?"),nc("?","pathname","search",a)),Je(!a.pathname||!a.pathname.includes("#"),nc("#","pathname","hash",a)),Je(!a.search||!a.search.includes("#"),nc("#","search","hash",a)));let u=n===""||a.pathname==="",d=u?"/":a.pathname,h;if(d==null)h=s;else{let w=t.length-1;if(!i&&d.startsWith("..")){let b=d.split("/");for(;b[0]==="..";)b.shift(),w-=1;a.pathname=b.join("/")}h=w>=0?t[w]:"/"}let p=BE(a,h),g=d&&d!=="/"&&d.endsWith("/"),v=(u||d===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(g||v)&&(p.pathname+="/"),p}const Ey=n=>n.replace(/\/\/+/g,"/"),wr=n=>Ey(n.join("/")),VE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),HE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,WE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function qE(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Sy=["post","put","patch","delete"];new Set(Sy);const QE=["get",...Sy];new Set(QE);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function eo(){return eo=Object.assign?Object.assign.bind():function(n){for(var t=1;t{h.current=!0}),_.useCallback(function(g,v){if(v===void 0&&(v={}),!h.current)return;if(typeof g=="number"){i.go(g);return}let w=xy(g,JSON.parse(d),u,v.relative==="path");n==null&&t!=="/"&&(w.pathname=w.pathname==="/"?t:wr([t,w.pathname])),(v.replace?i.replace:i.push)(w,v.state,v)},[t,i,d,u,n])}function Cy(n,t){let{relative:s}=t===void 0?{}:t,{future:i}=_.useContext(os),{matches:a}=_.useContext(as),{pathname:u}=Gs(),d=JSON.stringify(wy(a,i.v7_relativeSplatPath));return _.useMemo(()=>xy(n,JSON.parse(d),u,s==="path"),[n,d,u,s])}function ZE(n,t){return eS(n,t)}function eS(n,t,s,i){co()||Je(!1);let{navigator:a}=_.useContext(os),{matches:u}=_.useContext(as),d=u[u.length-1],h=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let g=Gs(),v;if(t){var w;let x=typeof t=="string"?Ks(t):t;p==="/"||(w=x.pathname)!=null&&w.startsWith(p)||Je(!1),v=x}else v=g;let b=v.pathname||"/",j=b;if(p!=="/"){let x=p.replace(/^\//,"").split("/");j="/"+b.replace(/^\//,"").split("/").slice(x.length).join("/")}let D=bE(n,{pathname:j}),C=iS(D&&D.map(x=>Object.assign({},x,{params:Object.assign({},h,x.params),pathname:wr([p,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?p:wr([p,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),u,s,i);return t&&C?_.createElement(uo.Provider,{value:{location:eo({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:yr.Pop}},C):C}function tS(){let n=uS(),t=qE(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),s?_.createElement("pre",{style:a},s):null,null)}const nS=_.createElement(tS,null);class rS extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?_.createElement(as.Provider,{value:this.props.routeContext},_.createElement(_y.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sS(n){let{routeContext:t,match:s,children:i}=n,a=_.useContext(hd);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),_.createElement(as.Provider,{value:t},i)}function iS(n,t,s,i){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),i===void 0&&(i=null),n==null){var u;if(!s)return null;if(s.errors)n=s.matches;else if((u=i)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,h=(a=s)==null?void 0:a.errors;if(h!=null){let v=d.findIndex(w=>w.route.id&&(h==null?void 0:h[w.route.id])!==void 0);v>=0||Je(!1),d=d.slice(0,Math.min(d.length,v+1))}let p=!1,g=-1;if(s&&i&&i.v7_partialHydration)for(let v=0;v=0?d=d.slice(0,g+1):d=[d[0]];break}}}return d.reduceRight((v,w,b)=>{let j,D=!1,C=null,x=null;s&&(j=h&&w.route.id?h[w.route.id]:void 0,C=w.route.errorElement||nS,p&&(g<0&&b===0?(dS("route-fallback"),D=!0,x=null):g===b&&(D=!0,x=w.route.hydrateFallbackElement||null)));let S=t.concat(d.slice(0,b+1)),L=()=>{let T;return j?T=C:D?T=x:w.route.Component?T=_.createElement(w.route.Component,null):w.route.element?T=w.route.element:T=v,_.createElement(sS,{match:w,routeContext:{outlet:v,matches:S,isDataRoute:s!=null},children:T})};return s&&(w.route.ErrorBoundary||w.route.errorElement||b===0)?_.createElement(rS,{location:s.location,revalidation:s.revalidation,component:C,error:j,children:L(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):L()},null)}var ky=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(ky||{}),Ry=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(Ry||{});function oS(n){let t=_.useContext(hd);return t||Je(!1),t}function aS(n){let t=_.useContext(KE);return t||Je(!1),t}function lS(n){let t=_.useContext(as);return t||Je(!1),t}function Ty(n){let t=lS(),s=t.matches[t.matches.length-1];return s.route.id||Je(!1),s.route.id}function uS(){var n;let t=_.useContext(_y),s=aS(),i=Ty();return t!==void 0?t:(n=s.errors)==null?void 0:n[i]}function cS(){let{router:n}=oS(ky.UseNavigateStable),t=Ty(Ry.UseNavigateStable),s=_.useRef(!1);return by(()=>{s.current=!0}),_.useCallback(function(a,u){u===void 0&&(u={}),s.current&&(typeof a=="number"?n.navigate(a):n.navigate(a,eo({fromRouteId:t},u)))},[n,t])}const im={};function dS(n,t,s){im[n]||(im[n]=!0)}function fS(n,t){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Fc(n){Je(!1)}function hS(n){let{basename:t="/",children:s=null,location:i,navigationType:a=yr.Pop,navigator:u,static:d=!1,future:h}=n;co()&&Je(!1);let p=t.replace(/^\/*/,"/"),g=_.useMemo(()=>({basename:p,navigator:u,static:d,future:eo({v7_relativeSplatPath:!1},h)}),[p,h,u,d]);typeof i=="string"&&(i=Ks(i));let{pathname:v="/",search:w="",hash:b="",state:j=null,key:D="default"}=i,C=_.useMemo(()=>{let x=fd(v,p);return x==null?null:{location:{pathname:x,search:w,hash:b,state:j,key:D},navigationType:a}},[p,v,w,b,j,D,a]);return C==null?null:_.createElement(os.Provider,{value:g},_.createElement(uo.Provider,{children:s,value:C}))}function pS(n){let{children:t,location:s}=n;return ZE(Dc(t),s)}new Promise(()=>{});function Dc(n,t){t===void 0&&(t=[]);let s=[];return _.Children.forEach(n,(i,a)=>{if(!_.isValidElement(i))return;let u=[...t,a];if(i.type===_.Fragment){s.push.apply(s,Dc(i.props.children,u));return}i.type!==Fc&&Je(!1),!i.props.index||!i.props.children||Je(!1);let d={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=Dc(i.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Mc(){return Mc=Object.assign?Object.assign.bind():function(n){for(var t=1;t{g&&om?om(()=>p(w)):p(w)},[p,g]);return _.useLayoutEffect(()=>d.listen(v),[d,v]),_.useEffect(()=>fS(i),[i]),_.createElement(hS,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:i})}const SS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_S=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bS=_.forwardRef(function(t,s){let{onClick:i,relative:a,reloadDocument:u,replace:d,state:h,target:p,to:g,preventScrollReset:v,viewTransition:w}=t,b=mS(t,vS),{basename:j}=_.useContext(os),D,C=!1;if(typeof g=="string"&&_S.test(g)&&(D=g,SS))try{let T=new URL(window.location.href),A=g.startsWith("//")?new URL(T.protocol+g):new URL(g),$=fd(A.pathname,j);A.origin===T.origin&&$!=null?g=$+A.search+A.hash:C=!0}catch{}let x=GE(g,{relative:a}),S=CS(g,{replace:d,state:h,target:p,preventScrollReset:v,relative:a,viewTransition:w});function L(T){i&&i(T),T.defaultPrevented||S(T)}return _.createElement("a",Mc({},b,{href:D||x,onClick:C||u?i:L,ref:s,target:p}))});var am;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(am||(am={}));var lm;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(lm||(lm={}));function CS(n,t){let{target:s,replace:i,state:a,preventScrollReset:u,relative:d,viewTransition:h}=t===void 0?{}:t,p=YE(),g=Gs(),v=Cy(n,{relative:d});return _.useCallback(w=>{if(yS(w,s)){w.preventDefault();let b=i!==void 0?i:qa(g)===qa(v);p(n,{replace:b,state:a,preventScrollReset:u,relative:d,viewTransition:h})}},[g,p,v,i,a,s,n,u,d,h])}function Ny(n,t){return function(){return n.apply(t,arguments)}}const{toString:kS}=Object.prototype,{getPrototypeOf:qs}=Object,{iterator:fo,toStringTag:Py}=Symbol,Qa=(({hasOwnProperty:n})=>(t,s)=>n.call(t,s))(Object.prototype),to=(n,t)=>{let s=n;const i=[];for(;s!=null&&s!==Object.prototype;){if(i.indexOf(s)!==-1)return!1;if(i.push(s),Qa(s,t))return!0;s=qs(s)}return!1},RS=(n,t)=>n!=null&&to(n,t)?n[t]:void 0,pd=(n=>t=>{const s=kS.call(t);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),cn=n=>(n=n.toLowerCase(),t=>pd(t)===n),Ja=n=>t=>typeof t===n,{isArray:rs}=Array,Qs=Ja("undefined");function Xs(n){return n!==null&&!Qs(n)&&n.constructor!==null&&!Qs(n.constructor)&&At(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Oy=cn("ArrayBuffer");function TS(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Oy(n.buffer),t}const NS=Ja("string"),At=Ja("function"),Ay=Ja("number"),Ys=n=>n!==null&&typeof n=="object",PS=n=>n===!0||n===!1,Da=n=>{if(!Ys(n))return!1;const t=qs(n);return(t===null||t===Object.prototype||qs(t)===null)&&!to(n,Py)&&!to(n,fo)},OS=n=>{if(!Ys(n)||Xs(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},AS=cn("Date"),jS=cn("File"),LS=n=>!!(n&&typeof n.uri<"u"),IS=n=>n&&typeof n.getParts<"u",FS=cn("Blob"),DS=cn("FileList"),MS=n=>Ys(n)&&At(n.pipe);function US(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const um=US(),cm=typeof um.FormData<"u"?um.FormData:void 0,zS=n=>{if(!n)return!1;if(cm&&n instanceof cm)return!0;const t=qs(n);if(!t||t===Object.prototype||!At(n.append))return!1;const s=pd(n);return s==="formdata"||s==="object"&&At(n.toString)&&n.toString()==="[object FormData]"},BS=cn("URLSearchParams"),[$S,VS,HS,WS]=["ReadableStream","Request","Response","Headers"].map(cn),qS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ho(n,t,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let i,a;if(typeof n!="object"&&(n=[n]),rs(n))for(i=0,a=n.length;i0;)if(a=s[i],t===a.toLowerCase())return a;return null}const $r=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ly=n=>!Qs(n)&&n!==$r;function Uc(...n){const{caseless:t,skipUndefined:s}=Ly(this)&&this||{},i={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&jy(i,d)||d,p=Qa(i,h)?i[h]:void 0;Da(p)&&Da(u)?i[h]=Uc(p,u):Da(u)?i[h]=Uc({},u):rs(u)?i[h]=u.slice():(!s||!Qs(u))&&(i[h]=u)};for(let u=0,d=n.length;u(ho(t,(a,u)=>{s&&At(a)?Object.defineProperty(n,u,{__proto__:null,value:Ny(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),KS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),GS=(n,t,s,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(n.prototype,s)},XS=(n,t,s,i)=>{let a,u,d;const h={};if(t=t||{},n==null)return t;do{for(a=Object.getOwnPropertyNames(n),u=a.length;u-- >0;)d=a[u],(!i||i(d,n,t))&&!h[d]&&(t[d]=n[d],h[d]=!0);n=s!==!1&&qs(n)}while(n&&(!s||s(n,t))&&n!==Object.prototype);return t},YS=(n,t,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=t.length;const i=n.indexOf(t,s);return i!==-1&&i===s},JS=n=>{if(!n)return null;if(rs(n))return n;let t=n.length;if(!Ay(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=n[t];return s},ZS=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&qs(Uint8Array)),e_=(n,t)=>{const i=(n&&n[fo]).call(n);let a;for(;(a=i.next())&&!a.done;){const u=a.value;t.call(n,u[0],u[1])}},t_=(n,t)=>{let s;const i=[];for(;(s=n.exec(t))!==null;)i.push(s);return i},n_=cn("HTMLFormElement"),r_=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,i,a){return i.toUpperCase()+a}),{propertyIsEnumerable:s_}=Object.prototype,i_=cn("RegExp"),Iy=(n,t)=>{const s=Object.getOwnPropertyDescriptors(n),i={};ho(s,(a,u)=>{let d;(d=t(a,u,n))!==!1&&(i[u]=d||a)}),Object.defineProperties(n,i)},o_=n=>{Iy(n,(t,s)=>{if(At(n)&&["arguments","caller","callee"].includes(s))return!1;const i=n[s];if(At(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},a_=(n,t)=>{const s={},i=a=>{a.forEach(u=>{s[u]=!0})};return rs(n)?i(n):i(String(n).split(t)),s},l_=()=>{},u_=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function c_(n){return!!(n&&At(n.append)&&n[Py]==="FormData"&&n[fo])}const d_=n=>{const t=new WeakSet,s=i=>{if(Ys(i)){if(t.has(i))return;if(Xs(i))return i;if(!("toJSON"in i)){t.add(i);const a=rs(i)?[]:{};return ho(i,(u,d)=>{const h=s(u);!Qs(h)&&(a[d]=h)}),t.delete(i),a}}return i};return s(n)},f_=cn("AsyncFunction"),h_=n=>n&&(Ys(n)||At(n))&&At(n.then)&&At(n.catch),Fy=((n,t)=>n?setImmediate:t?((s,i)=>($r.addEventListener("message",({source:a,data:u})=>{a===$r&&u===s&&i.length&&i.shift()()},!1),a=>{i.push(a),$r.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",At($r.postMessage)),p_=typeof queueMicrotask<"u"?queueMicrotask.bind($r):typeof process<"u"&&process.nextTick||Fy,Dy=n=>n!=null&&At(n[fo]),m_=n=>n!=null&&to(n,fo)&&Dy(n),O={isArray:rs,isArrayBuffer:Oy,isBuffer:Xs,isFormData:zS,isArrayBufferView:TS,isString:NS,isNumber:Ay,isBoolean:PS,isObject:Ys,isPlainObject:Da,isEmptyObject:OS,isReadableStream:$S,isRequest:VS,isResponse:HS,isHeaders:WS,isUndefined:Qs,isDate:AS,isFile:jS,isReactNativeBlob:LS,isReactNative:IS,isBlob:FS,isRegExp:i_,isFunction:At,isStream:MS,isURLSearchParams:BS,isTypedArray:ZS,isFileList:DS,forEach:ho,merge:Uc,extend:QS,trim:qS,stripBOM:KS,inherits:GS,toFlatObject:XS,kindOf:pd,kindOfTest:cn,endsWith:YS,toArray:JS,forEachEntry:e_,matchAll:t_,isHTMLForm:n_,hasOwnProperty:Qa,hasOwnProp:Qa,hasOwnInPrototypeChain:to,getSafeProp:RS,reduceDescriptors:Iy,freezeMethods:o_,toObjectSet:a_,toCamelCase:r_,noop:l_,toFiniteNumber:u_,findKey:jy,global:$r,isContextDefined:Ly,isSpecCompliantForm:c_,toJSONObject:d_,isAsyncFn:f_,isThenable:h_,setImmediate:Fy,asap:p_,isIterable:Dy,isSafeIterable:m_},g_=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),y_=n=>{const t={};let s,i,a;return n&&n.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),i=d.substring(a+1).trim(),!(!s||t[s]&&g_[s])&&(s==="set-cookie"?t[s]?t[s].push(i):t[s]=[i]:t[s]=t[s]?t[s]+", "+i:i)}),t};function v_(n){let t=0,s=n.length;for(;tt;){const i=n.charCodeAt(s-1);if(i!==9&&i!==32)break;s-=1}return t===0&&s===n.length?n:n.slice(t,s)}const w_=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),x_=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function md(n,t){return O.isArray(n)?n.map(s=>md(s,t)):v_(String(n).replace(t,""))}const E_=n=>md(n,w_),S_=n=>md(n,x_);function My(n){const t=Object.create(null);return O.forEach(n.toJSON(),(s,i)=>{t[i]=S_(s)}),t}const dm=Symbol("internals");function Ui(n){return n&&String(n).trim().toLowerCase()}function Ma(n){return n===!1||n==null?n:O.isArray(n)?n.map(Ma):E_(String(n))}function __(n){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=s.exec(n);)t[i[1]]=i[2];return t}const b_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function rc(n,t,s,i,a){if(O.isFunction(i))return i.call(this,t,s);if(a&&(t=s),!!O.isString(t)){if(O.isString(i))return t.indexOf(i)!==-1;if(O.isRegExp(i))return i.test(t)}}function C_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,i)=>s.toUpperCase()+i)}function k_(n,t){const s=O.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+s,{__proto__:null,value:function(a,u,d){return this[i].call(this,t,a,u,d)},configurable:!0})})}let xt=class{constructor(t){t&&this.set(t)}set(t,s,i){const a=this;function u(h,p,g){const v=Ui(p);if(!v)return;const w=O.findKey(a,v);(!w||a[w]===void 0||g===!0||g===void 0&&a[w]!==!1)&&(a[w||p]=Ma(h))}const d=(h,p)=>O.forEach(h,(g,v)=>u(g,v,p));if(O.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(O.isString(t)&&(t=t.trim())&&!b_(t))d(y_(t),s);else if(O.isObject(t)&&O.isSafeIterable(t)){let h=Object.create(null),p,g;for(const v of t){if(!O.isArray(v))throw new TypeError("Object iterator must return a key-value pair");g=v[0],O.hasOwnProp(h,g)?(p=h[g],h[g]=O.isArray(p)?[...p,v[1]]:[p,v[1]]):h[g]=v[1]}d(h,s)}else t!=null&&u(s,t,i);return this}get(t,s){if(t=Ui(t),t){const i=O.findKey(this,t);if(i){const a=this[i];if(!s)return a;if(s===!0)return __(a);if(O.isFunction(s))return s.call(this,a,i);if(O.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Ui(t),t){const i=O.findKey(this,t);return!!(i&&this[i]!==void 0&&(!s||rc(this,this[i],i,s)))}return!1}delete(t,s){const i=this;let a=!1;function u(d){if(d=Ui(d),d){const h=O.findKey(i,d);h&&(!s||rc(i,i[h],h,s))&&(delete i[h],a=!0)}}return O.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let i=s.length,a=!1;for(;i--;){const u=s[i];(!t||rc(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,i={};return O.forEach(this,(a,u)=>{const d=O.findKey(i,u);if(d){s[d]=Ma(a),delete s[u];return}const h=t?C_(u):String(u).trim();h!==u&&delete s[u],s[h]=Ma(a),i[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return O.forEach(this,(i,a)=>{i!=null&&i!==!1&&(s[a]=t&&O.isArray(i)?i.join(", "):i)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const i=new this(t);return s.forEach(a=>i.set(a)),i}static accessor(t){const i=(this[dm]=this[dm]={accessors:{}}).accessors,a=this.prototype;function u(d){const h=Ui(d);i[h]||(k_(a,d),i[h]=!0)}return O.isArray(t)?t.forEach(u):u(t),this}};xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(xt.prototype,({value:n},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[s]=i}}});O.freezeMethods(xt);const R_="[REDACTED ****]";function T_(n){if(O.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(O.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function N_(n,t){const s=new Set(t.map(u=>String(u).toLowerCase())),i=[],a=u=>{if(u===null||typeof u!="object"||O.isBuffer(u))return u;if(i.indexOf(u)!==-1)return;u instanceof xt&&(u=u.toJSON()),i.push(u);let d;if(O.isArray(u))d=[],u.forEach((h,p)=>{const g=a(h);O.isUndefined(g)||(d[p]=g)});else{if(!O.isPlainObject(u)&&T_(u))return i.pop(),u;d=Object.create(null);for(const[h,p]of Object.entries(u)){const g=s.has(h.toLowerCase())?R_:a(p);O.isUndefined(g)||(d[h]=g)}}return i.pop(),d};return a(n)}let Y=class Uy extends Error{static from(t,s,i,a,u,d){const h=new Uy(t.message,s||t.code,i,a,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,i,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),i&&(this.config=i),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&O.hasOwnProp(t,"redact")?t.redact:void 0,i=O.isArray(s)&&s.length>0?N_(t,s):O.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Y.ERR_BAD_OPTION="ERR_BAD_OPTION";Y.ECONNABORTED="ECONNABORTED";Y.ETIMEDOUT="ETIMEDOUT";Y.ECONNREFUSED="ECONNREFUSED";Y.ERR_NETWORK="ERR_NETWORK";Y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Y.ERR_DEPRECATED="ERR_DEPRECATED";Y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Y.ERR_CANCELED="ERR_CANCELED";Y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Y.ERR_INVALID_URL="ERR_INVALID_URL";Y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const P_=null,zy=100;function zc(n){return O.isPlainObject(n)||O.isArray(n)}function By(n){return O.endsWith(n,"[]")?n.slice(0,-2):n}function sc(n,t,s){return n?n.concat(t).map(function(a,u){return a=By(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function O_(n){return O.isArray(n)&&!n.some(zc)}const A_=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Za(n,t,s){if(!O.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,s=O.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,T){return!O.isUndefined(T[L])});const i=s.metaTokens,a=s.visitor||D,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,p=s.maxDepth===void 0?zy:s.maxDepth,g=h&&O.isSpecCompliantForm(t),v=[];if(!O.isFunction(a))throw new TypeError("visitor must be a function");function w(S){if(S===null)return"";if(O.isDate(S))return S.toISOString();if(O.isBoolean(S))return S.toString();if(!g&&O.isBlob(S))throw new Y("Blob is not supported. Use a Buffer instead.");if(O.isArrayBuffer(S)||O.isTypedArray(S)){if(g&&typeof h=="function")return new h([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new Y("Blob is not supported. Use a Buffer instead.",Y.ERR_NOT_SUPPORT)}return S}function b(S){if(S>p)throw new Y("Object is too deeply nested ("+S+" levels). Max depth: "+p,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function j(S,L){if(p===1/0)return JSON.stringify(S);const T=[];return JSON.stringify(S,function($,V){if(!O.isObject(V))return V;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(V),b(L+T.length-1),V})}function D(S,L,T){let A=S;if(O.isReactNative(t)&&O.isReactNativeBlob(S))return t.append(sc(T,L,u),w(S)),!1;if(S&&!T&&typeof S=="object"){if(O.endsWith(L,"{}"))L=i?L:L.slice(0,-2),S=j(S,1);else if(O.isArray(S)&&O_(S)||(O.isFileList(S)||O.endsWith(L,"[]"))&&(A=O.toArray(S)))return L=By(L),A.forEach(function(V,G){!(O.isUndefined(V)||V===null)&&t.append(d===!0?sc([L],G,u):d===null?L:L+"[]",w(V))}),!1}return zc(S)?!0:(t.append(sc(T,L,u),w(S)),!1)}const C=Object.assign(A_,{defaultVisitor:D,convertValue:w,isVisitable:zc});function x(S,L,T=0){if(!O.isUndefined(S)){if(b(T),v.indexOf(S)!==-1)throw new Error("Circular reference detected in "+L.join("."));v.push(S),O.forEach(S,function($,V){(!(O.isUndefined($)||$===null)&&a.call(t,$,O.isString(V)?V.trim():V,L,C))===!0&&x($,L?L.concat(V):[V],T+1)}),v.pop()}}if(!O.isObject(n))throw new TypeError("data must be an object");return x(n),t}function fm(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function gd(n,t){this._pairs=[],n&&Za(n,this,t)}const $y=gd.prototype;$y.append=function(t,s){this._pairs.push([t,s])};$y.toString=function(t){const s=t?i=>t.call(this,i,fm):fm;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function j_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vy(n,t,s){if(!t)return n;n=n||"";const i=O.isFunction(s)?{serialize:s}:s,a=O.getSafeProp(i,"encode")||j_,u=O.getSafeProp(i,"serialize");let d;if(u?d=u(t,i):d=O.isURLSearchParams(t)?t.toString():new gd(t,i).toString(a),d){const h=n.indexOf("#");h!==-1&&(n=n.slice(0,h)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class hm{constructor(){this.handlers=[]}use(t,s,i){return this.handlers.push({fulfilled:t,rejected:s,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(i){i!==null&&t(i)})}}const yd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},L_=typeof URLSearchParams<"u"?URLSearchParams:gd,I_=typeof FormData<"u"?FormData:null,F_=typeof Blob<"u"?Blob:null,D_={isBrowser:!0,classes:{URLSearchParams:L_,FormData:I_,Blob:F_},protocols:["http","https","file","blob","url","data"]},vd=typeof window<"u"&&typeof document<"u",Bc=typeof navigator=="object"&&navigator||void 0,M_=vd&&(!Bc||["ReactNative","NativeScript","NS"].indexOf(Bc.product)<0),U_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",z_=vd&&window.location.href||"http://localhost",B_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vd,hasStandardBrowserEnv:M_,hasStandardBrowserWebWorkerEnv:U_,navigator:Bc,origin:z_},Symbol.toStringTag,{value:"Module"})),ht={...B_,...D_};function $_(n,t){return Za(n,new ht.classes.URLSearchParams,{visitor:function(s,i,a,u){return ht.isNode&&O.isBuffer(s)?(this.append(i,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const pm=zy;function Hy(n){if(n>pm)throw new Y("FormData field is too deeply nested ("+n+" levels). Max depth: "+pm,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function V_(n){const t=[],s=/\w+|\[(\w*)]/g;let i;for(;(i=s.exec(n))!==null;)Hy(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function H_(n){const t={},s=Object.keys(n);let i;const a=s.length;let u;for(i=0;i=s.length;return d=!d&&O.isArray(a)?a.length:d,p?(O.hasOwnProp(a,d)?a[d]=O.isArray(a[d])?a[d].concat(i):[a[d],i]:a[d]=i,!h):((!O.hasOwnProp(a,d)||!O.isObject(a[d]))&&(a[d]=[]),t(s,i,a[d],u)&&O.isArray(a[d])&&(a[d]=H_(a[d])),!h)}if(O.isFormData(n)&&O.isFunction(n.entries)){const s={};return O.forEachEntry(n,(i,a)=>{t(V_(i),a,s,0)}),s}return null}const As=(n,t)=>n!=null&&O.hasOwnProp(n,t)?n[t]:void 0;function W_(n,t,s){if(O.isString(n))try{return(t||JSON.parse)(n),O.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(s||JSON.stringify)(n)}const po={transitional:yd,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const i=s.getContentType()||"",a=i.indexOf("application/json")>-1,u=O.isObject(t);if(u&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return a?JSON.stringify(Wy(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t)||O.isReadableStream(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const p=As(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return $_(t,p).toString();if((h=O.isFileList(t))||i.indexOf("multipart/form-data")>-1){const g=As(this,"env"),v=g&&g.FormData;return Za(h?{"files[]":t}:t,v&&new v,p)}}return u||a?(s.setContentType("application/json",!1),W_(t)):t}],transformResponse:[function(t){const s=As(this,"transitional")||po.transitional,i=s&&s.forcedJSONParsing,a=As(this,"responseType"),u=a==="json";if(O.isResponse(t)||O.isReadableStream(t))return t;if(t&&O.isString(t)&&(i&&!a||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,As(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?Y.from(p,Y.ERR_BAD_RESPONSE,this,null,As(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch","query"],n=>{po.headers[n]={}});function ic(n,t){const s=this||po,i=t||s,a=xt.from(i.headers);let u=i.data;return O.forEach(n,function(h){u=h.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function qy(n){return!!(n&&n.__CANCEL__)}let mo=class extends Y{constructor(t,s,i){super(t??"canceled",Y.ERR_CANCELED,s,i),this.name="CanceledError",this.__CANCEL__=!0}};function Qy(n,t,s){const i=s.config.validateStatus;!s.status||!i||i(s.status)?n(s):t(new Y("Request failed with status code "+s.status,s.status>=400&&s.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,s.config,s.request,s))}function q_(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Q_(n,t){n=n||10;const s=new Array(n),i=new Array(n);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(p){const g=Date.now(),v=i[u];d||(d=g),s[a]=p,i[a]=g;let w=u,b=0;for(;w!==a;)b+=s[w++],w=w%n;if(a=(a+1)%n,a===u&&(u=(u+1)%n),g-d{s=v,a=null,u&&(clearTimeout(u),u=null),n(...g)};return[(...g)=>{const v=Date.now(),w=v-s;w>=i?d(g,v):(a=g,u||(u=setTimeout(()=>{u=null,d(a)},i-w)))},()=>a&&d(a)]}const Ka=(n,t,s=3)=>{let i=0;const a=Q_(50,250);return K_(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,p=h!=null?Math.min(d,h):d,g=Math.max(0,p-i),v=a(g);i=Math.max(i,p);const w={loaded:p,total:h,progress:h?p/h:void 0,bytes:g,rate:v||void 0,estimated:v&&h?(h-p)/v:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};n(w)},s)},mm=(n,t)=>{const s=n!=null;return[i=>t[0]({lengthComputable:s,total:n,loaded:i}),t[1]]},gm=n=>(...t)=>O.asap(()=>n(...t)),G_=ht.hasStandardBrowserEnv?((n,t)=>s=>(s=new URL(s,ht.origin),n.protocol===s.protocol&&n.host===s.host&&(t||n.port===s.port)))(new URL(ht.origin),ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent)):()=>!0,X_=ht.hasStandardBrowserEnv?{write(n,t,s,i,a,u,d){if(typeof document>"u")return;const h=[`${n}=${encodeURIComponent(t)}`];O.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),O.isString(i)&&h.push(`path=${i}`),O.isString(a)&&h.push(`domain=${a}`),u===!0&&h.push("secure"),O.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sn instanceof xt?{...n}:n;function ss(n,t){n=n||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(v,w,b,j){return O.isPlainObject(v)&&O.isPlainObject(w)?O.merge.call({caseless:j},v,w):O.isPlainObject(w)?O.merge({},w):O.isArray(w)?w.slice():w}function a(v,w,b,j){if(O.isUndefined(w)){if(!O.isUndefined(v))return i(void 0,v,b,j)}else return i(v,w,b,j)}function u(v,w){if(!O.isUndefined(w))return i(void 0,w)}function d(v,w){if(O.isUndefined(w)){if(!O.isUndefined(v))return i(void 0,v)}else return i(void 0,w)}function h(v){const w=O.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!O.isUndefined(w))if(O.isPlainObject(w)){if(O.hasOwnProp(w,v))return w[v]}else return;const b=O.hasOwnProp(n,"transitional")?n.transitional:void 0;if(O.isPlainObject(b)&&O.hasOwnProp(b,v))return b[v]}function p(v,w,b){if(O.hasOwnProp(t,b))return i(v,w);if(O.hasOwnProp(n,b))return i(void 0,v)}const g={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:p,headers:(v,w,b)=>a(vm(v),vm(w),b,!0)};return O.forEach(Object.keys({...n,...t}),function(w){if(w==="__proto__"||w==="constructor"||w==="prototype")return;const b=O.hasOwnProp(g,w)?g[w]:a,j=O.hasOwnProp(n,w)?n[w]:void 0,D=O.hasOwnProp(t,w)?t[w]:void 0,C=b(j,D,w);O.isUndefined(C)&&b!==p||(s[w]=C)}),O.hasOwnProp(t,"validateStatus")&&O.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(O.hasOwnProp(n,"validateStatus")?s.validateStatus=i(void 0,n.validateStatus):delete s.validateStatus),s}const rb=["content-type","content-length"];function sb(n,t,s){if(s!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,a])=>{rb.includes(i.toLowerCase())&&n.set(i,a)})}const ib=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function Gy(n){const t=ss({},n),s=b=>O.hasOwnProp(t,b)?t[b]:void 0,i=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const p=s("auth"),g=s("baseURL"),v=s("allowAbsoluteUrls"),w=s("url");if(t.headers=h=xt.from(h),t.url=Vy(Ky(g,w,v,t),s("params"),s("paramsSerializer")),p){const b=O.getSafeProp(p,"username")||"",j=O.getSafeProp(p,"password")||"";try{h.set("Authorization","Basic "+btoa(b+":"+(j?ib(j):"")))}catch(D){throw Y.from(D,Y.ERR_BAD_OPTION_VALUE,n)}}if(O.isFormData(i)&&(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv||O.isReactNative(i)?h.setContentType(void 0):O.isFunction(i.getHeaders)&&sb(h,i.getHeaders(),s("formDataHeaderPolicy"))),ht.hasStandardBrowserEnv&&(O.isFunction(a)&&(a=a(t)),a===!0||a==null&&G_(t.url))){const j=u&&d&&X_.read(d);j&&h.set(u,j)}return t}const ob=typeof XMLHttpRequest<"u",ab=ob&&function(n){return new Promise(function(s,i){const a=Gy(n);let u=a.data;const d=xt.from(a.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:g}=a,v,w,b,j,D;function C(){j&&j(),D&&D(),a.cancelToken&&a.cancelToken.unsubscribe(v),a.signal&&a.signal.removeEventListener("abort",v)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function S(){if(!x)return;const T=xt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),$={data:!h||h==="text"||h==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:T,config:n,request:x};Qy(function(G){s(G),C()},function(G){i(G),C()},$),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(S)},x.onabort=function(){x&&(i(new Y("Request aborted",Y.ECONNABORTED,n,x)),C(),x=null)},x.onerror=function(A){const $=A&&A.message?A.message:"Network Error",V=new Y($,Y.ERR_NETWORK,n,x);V.event=A||null,i(V),C(),x=null},x.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const $=a.transitional||yd;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),i(new Y(A,$.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,n,x)),C(),x=null},u===void 0&&d.setContentType(null),"setRequestHeader"in x&&O.forEach(My(d),function(A,$){x.setRequestHeader($,A)}),O.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),h&&h!=="json"&&(x.responseType=a.responseType),g&&([b,D]=Ka(g,!0),x.addEventListener("progress",b)),p&&x.upload&&([w,j]=Ka(p),x.upload.addEventListener("progress",w),x.upload.addEventListener("loadend",j)),(a.cancelToken||a.signal)&&(v=T=>{x&&(i(!T||T.type?new mo(null,n,x):T),x.abort(),C(),x=null)},a.cancelToken&&a.cancelToken.subscribe(v),a.signal&&(a.signal.aborted?v():a.signal.addEventListener("abort",v)));const L=q_(a.url);if(L&&!ht.protocols.includes(L)){i(new Y("Unsupported protocol "+L+":",Y.ERR_BAD_REQUEST,n)),C();return}x.send(u||null)})},lb=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const s=new AbortController;let i=!1;const a=function(p){if(!i){i=!0,d();const g=p instanceof Error?p:this.reason;s.abort(g instanceof Y?g:new mo(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,a(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t);const d=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),n=null)};n.forEach(p=>p.addEventListener("abort",a,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>O.asap(d),h},ub=function*(n,t){let s=n.byteLength;if(s{const a=cb(n,t);let u=0,d,h=p=>{d||(d=!0,i&&i(p))};return new ReadableStream({async pull(p){try{const{done:g,value:v}=await a.next();if(g){h(),p.close();return}let w=v.byteLength;if(s){let b=u+=w;s(b)}p.enqueue(new Uint8Array(v))}catch(g){throw h(g),g}},cancel(p){return h(p),a.return()}},{highWaterMark:2})},Ga=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,fb=(n,t,s)=>t+2j>=2&&i.charCodeAt(j-2)===37&&i.charCodeAt(j-1)===51&&(i.charCodeAt(j)===68||i.charCodeAt(j)===100);g>=0&&(i.charCodeAt(g)===61?(p++,g--):v(g)&&(p++,g-=3)),p===1&&g>=0&&(i.charCodeAt(g)===61||v(g))&&p++;const b=Math.floor(d/4)*3-(p||0);return b>0?b:0}let u=0;for(let d=0,h=i.length;d=55296&&p<=56319&&d+1=56320&&g<=57343?(u+=4,d++):u+=3}else u+=3}return u}const wd="1.18.1",xm=64*1024,{isFunction:Oa}=O,pb=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),Em=n=>{if(!O.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Sm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},mb=n=>{const t=n.indexOf("://");let s=n;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},gb=n=>{const t=O.global!==void 0&&O.global!==null?O.global:globalThis,{ReadableStream:s,TextEncoder:i}=t;n=O.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:a,Request:u,Response:d}=n,h=a?Oa(a):typeof fetch=="function",p=Oa(u),g=Oa(d);if(!h)return!1;const v=h&&Oa(s),w=h&&(typeof i=="function"?(S=>L=>S.encode(L))(new i):async S=>new Uint8Array(await new u(S).arrayBuffer())),b=p&&v&&Sm(()=>{let S=!1;const L=new u(ht.origin,{body:new s,method:"POST",get duplex(){return S=!0,"half"}}),T=L.headers.has("Content-Type");return L.body!=null&&L.body.cancel(),S&&!T}),j=g&&v&&Sm(()=>O.isReadableStream(new d("").body)),D={stream:j&&(S=>S.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!D[S]&&(D[S]=(L,T)=>{let A=L&&L[S];if(A)return A.call(L);throw new Y(`Response type '${S}' is not supported`,Y.ERR_NOT_SUPPORT,T)})});const C=async S=>{if(S==null)return 0;if(O.isBlob(S))return S.size;if(O.isSpecCompliantForm(S))return(await new u(ht.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(O.isArrayBufferView(S)||O.isArrayBuffer(S))return S.byteLength;if(O.isURLSearchParams(S)&&(S=S+""),O.isString(S))return(await w(S)).byteLength},x=async(S,L)=>{const T=O.toFiniteNumber(S.getContentLength());return T??C(L)};return async S=>{let{url:L,method:T,data:A,signal:$,cancelToken:V,timeout:G,onDownloadProgress:B,onUploadProgress:oe,responseType:ce,headers:Se,withCredentials:Ne="same-origin",fetchOptions:Ee,maxContentLength:J,maxBodyLength:be}=Gy(S);const _e=O.isNumber(J)&&J>-1,Ce=O.isNumber(be)&&be>-1,K=X=>O.hasOwnProp(S,X)?S[X]:void 0;let ae=a||fetch;ce=ce?(ce+"").toLowerCase():"text";let U=lb([$,V&&V.toAbortSignal()],G),P=null;const z=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let de,ge=null;const pe=()=>new Y("Request body larger than maxBodyLength limit",Y.ERR_BAD_REQUEST,S,P);try{let X;const we=K("auth");if(we){const xe=O.getSafeProp(we,"username")||"",lt=O.getSafeProp(we,"password")||"";X={username:xe,password:lt}}if(mb(L)){const xe=new URL(L,ht.origin);if(!X&&(xe.username||xe.password)){const lt=Em(xe.username),Yt=Em(xe.password);X={username:lt,password:Yt}}(xe.username||xe.password)&&(xe.username="",xe.password="",L=xe.href)}if(X&&(Se.delete("authorization"),Se.set("Authorization","Basic "+btoa(pb((X.username||"")+":"+(X.password||""))))),_e&&typeof L=="string"&&L.startsWith("data:")&&hb(L)>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,S,P);if(Ce&&T!=="get"&&T!=="head"){const xe=await C(A);if(typeof xe=="number"&&isFinite(xe)&&(de=xe,xe>be))throw pe()}const Te=Ce&&(O.isReadableStream(A)||O.isStream(A)),ve=(xe,lt,Yt)=>wm(xe,xm,Jt=>{if(Ce&&Jt>be)throw ge=pe();lt&<(Jt)},Yt);if(b&&T!=="get"&&T!=="head"&&(oe||Te)){if(de=de??await x(Se,A),de!==0||Te){let xe=new u(L,{method:"POST",body:A,duplex:"half"}),lt;if(O.isFormData(A)&&(lt=xe.headers.get("content-type"))&&Se.setContentType(lt),xe.body){const[Yt,Jt]=oe&&mm(de,Ka(gm(oe)))||[];A=ve(xe.body,Yt,Jt)}}}else if(Te&&!p&&v&&T!=="get"&&T!=="head")A=ve(A);else if(Te&&p&&!b&&T!=="get"&&T!=="head")throw new Y("Stream request bodies are not supported by the current fetch implementation",Y.ERR_NOT_SUPPORT,S,P);O.isString(Ne)||(Ne=Ne?"include":"omit");const nt=p&&"credentials"in u.prototype;if(O.isFormData(A)){const xe=Se.getContentType();xe&&/^multipart\/form-data/i.test(xe)&&!/boundary=/i.test(xe)&&Se.delete("content-type")}Se.set("User-Agent","axios/"+wd,!1);const Mt={...Ee,signal:U,method:T.toUpperCase(),headers:My(Se.normalize()),body:A,duplex:"half",credentials:nt?Ne:void 0};P=p&&new u(L,Mt);let at=await(p?ae(P,Ee):ae(L,Mt));const Xt=xt.from(at.headers);if(_e){const xe=O.toFiniteNumber(Xt.getContentLength());if(xe!=null&&xe>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,S,P)}const Ut=j&&(ce==="stream"||ce==="response");if(j&&at.body&&(B||_e||Ut&&z)){const xe={};["status","statusText","headers"].forEach(Sn=>{xe[Sn]=at[Sn]});const lt=O.toFiniteNumber(Xt.getContentLength()),[Yt,Jt]=B&&mm(lt,Ka(gm(B),!0))||[];let Un=0;const zn=Sn=>{if(_e&&(Un=Sn,Un>J))throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,S,P);Yt&&Yt(Sn)};at=new d(wm(at.body,xm,zn,()=>{Jt&&Jt(),z&&z()}),xe)}ce=ce||"text";let zt=await D[O.findKey(D,ce)||"text"](at,S);if(_e&&!j&&!Ut){let xe;if(zt!=null&&(typeof zt.byteLength=="number"?xe=zt.byteLength:typeof zt.size=="number"?xe=zt.size:typeof zt=="string"&&(xe=typeof i=="function"?new i().encode(zt).byteLength:zt.length)),typeof xe=="number"&&xe>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,S,P)}return!Ut&&z&&z(),await new Promise((xe,lt)=>{Qy(xe,lt,{data:zt,headers:xt.from(at.headers),status:at.status,statusText:at.statusText,config:S,request:P})})}catch(X){if(z&&z(),U&&U.aborted&&U.reason instanceof Y){const we=U.reason;throw we.config=S,P&&(we.request=P),X!==we&&Object.defineProperty(we,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),we}if(ge)throw P&&!ge.request&&(ge.request=P),ge;if(X instanceof Y)throw P&&!X.request&&(X.request=P),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const we=new Y("Network Error",Y.ERR_NETWORK,S,P,X&&X.response);throw Object.defineProperty(we,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),we}throw Y.from(X,X&&X.code,S,P,X&&X.response)}}},yb=new Map,Xy=n=>{let t=n&&n.env||{};const{fetch:s,Request:i,Response:a}=t,u=[i,a,s];let d=u.length,h=d,p,g,v=yb;for(;h--;)p=u[h],g=v.get(p),g===void 0&&v.set(p,g=h?new Map:gb(t)),v=g;return g};Xy();const xd={http:P_,xhr:ab,fetch:{get:Xy}};O.forEach(xd,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const _m=n=>`- ${n}`,vb=n=>O.isFunction(n)||n===null||n===!1;function wb(n,t){n=O.isArray(n)?n:[n];const{length:s}=n;let i,a;const u={};for(let d=0;d`adapter ${p} `+(g===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(_m).join(` `):" "+_m(d[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+h,Y.ERR_NOT_SUPPORT)}return a}const Yy={getAdapter:wb,adapters:xd};function oc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new mo(null,n)}function bm(n){return oc(n),n.headers=xt.from(n.headers),n.data=ic.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Yy.getAdapter(n.adapter||po.adapter,n)(n).then(function(i){oc(n),n.response=i;try{i.data=ic.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=xt.from(i.headers),i},function(i){if(!qy(i)&&(oc(n),i&&i.response)){n.response=i.response;try{i.response.data=ic.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=xt.from(i.response.headers)}return Promise.reject(i)})}const el={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{el[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const Cm={};el.transitional=function(t,s,i){function a(u,d){return"[Axios v"+wd+"] Transitional option '"+u+"'"+d+(i?". "+i:"")}return(u,d,h)=>{if(t===!1)throw new Y(a(d," has been removed"+(s?" in "+s:"")),Y.ERR_DEPRECATED);return s&&!Cm[d]&&(Cm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};el.spelling=function(t){return(s,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function xb(n,t,s){if(typeof n!="object"||n===null)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let a=i.length;for(;a-- >0;){const u=i[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=n[u],p=h===void 0||d(h,u,n);if(p!==!0)throw new Y("option "+u+" must be "+p,Y.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new Y("Unknown option "+u,Y.ERR_BAD_OPTION)}}const Ua={assertOptions:xb,validators:el},vt=Ua.validators;let Jr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new hm,response:new hm}}async request(t,s){try{return await this._request(t,s)}catch(i){if(i instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!i.stack)i.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),p=h===-1?"":u.slice(h+1);String(i.stack).endsWith(p)||(i.stack+=` `+u)}}catch{}}throw i}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=ss(this.defaults,s);const{transitional:i,paramsSerializer:a,headers:u}=s;i!==void 0&&Ua.assertOptions(i,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean),legacyInterceptorReqResOrdering:vt.transitional(vt.boolean),advertiseZstdAcceptEncoding:vt.transitional(vt.boolean),validateStatusUndefinedResolves:vt.transitional(vt.boolean)},!1),a!=null&&(O.isFunction(a)?s.paramsSerializer={serialize:a}:Ua.assertOptions(a,{encode:vt.function,serialize:vt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Ua.assertOptions(s,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&O.merge(u.common,u[s.method]);u&&O.forEach(["delete","get","head","post","put","patch","query","common"],D=>{delete u[D]}),s.headers=xt.concat(d,u);const h=[];let p=!0;this.interceptors.request.forEach(function(C){if(typeof C.runWhen=="function"&&C.runWhen(s)===!1)return;p=p&&C.synchronous;const x=s.transitional||yd;x&&x.legacyInterceptorReqResOrdering?h.unshift(C.fulfilled,C.rejected):h.push(C.fulfilled,C.rejected)});const g=[];this.interceptors.response.forEach(function(C){g.push(C.fulfilled,C.rejected)});let v,w=0,b;if(!p){const D=[bm.bind(this),void 0];for(D.unshift(...h),D.push(...g),b=D.length,v=Promise.resolve(s);w{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](a);i._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(h=>{i.subscribe(h),u=h}).then(a);return d.cancel=function(){i.unsubscribe(u)},d},t(function(u,d,h){i.reason||(i.reason=new mo(u,d,h),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=i=>{t.abort(i)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Jy(function(a){t=a}),cancel:t}}};function Sb(n){return function(s){return n.apply(null,s)}}function _b(n){return O.isObject(n)&&n.isAxiosError===!0}const $c={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries($c).forEach(([n,t])=>{$c[t]=n});function Zy(n){const t=new Jr(n),s=Ny(Jr.prototype.request,t);return O.extend(s,Jr.prototype,t,{allOwnKeys:!0}),O.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Zy(ss(n,a))},s}const Ge=Zy(po);Ge.Axios=Jr;Ge.CanceledError=mo;Ge.CancelToken=Eb;Ge.isCancel=qy;Ge.VERSION=wd;Ge.toFormData=Za;Ge.AxiosError=Y;Ge.Cancel=Ge.CanceledError;Ge.all=function(t){return Promise.all(t)};Ge.spread=Sb;Ge.isAxiosError=_b;Ge.mergeConfig=ss;Ge.AxiosHeaders=xt;Ge.formToJSON=n=>Wy(O.isHTMLForm(n)?new FormData(n):n);Ge.getAdapter=Yy.getAdapter;Ge.HttpStatusCode=$c;Ge.default=Ge;const{Axios:yR,AxiosError:vR,CanceledError:wR,isCancel:xR,CancelToken:ER,VERSION:SR,all:_R,Cancel:bR,isAxiosError:CR,spread:kR,toFormData:RR,AxiosHeaders:TR,HttpStatusCode:NR,formToJSON:PR,getAdapter:OR,mergeConfig:AR,create:jR}=Ge,ev=typeof window>"u",km=!ev&&window.self!==window.top,bb=!ev&&typeof document>"u",ac=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),dt=[];for(let n=0;n<256;++n)dt.push((n+256).toString(16).slice(1));function Cb(n,t=0){return(dt[n[t+0]]+dt[n[t+1]]+dt[n[t+2]]+dt[n[t+3]]+"-"+dt[n[t+4]]+dt[n[t+5]]+"-"+dt[n[t+6]]+dt[n[t+7]]+"-"+dt[n[t+8]]+dt[n[t+9]]+"-"+dt[n[t+10]]+dt[n[t+11]]+dt[n[t+12]]+dt[n[t+13]]+dt[n[t+14]]+dt[n[t+15]]).toLowerCase()}let lc;const kb=new Uint8Array(16);function Rb(){if(!lc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");lc=crypto.getRandomValues.bind(crypto)}return lc(kb)}const Tb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Rm={randomUUID:Tb};function Nb(n,t,s){var a;n=n||{};const i=n.random??((a=n.rng)==null?void 0:a.call(n))??Rb();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Cb(i)}function Pb(n,t,s){return Rm.randomUUID&&!n?Rm.randomUUID():Nb(n)}const zi=typeof window<"u"?window:{base44SharedInstances:{}};function Ob(n,t){return zi.base44SharedInstances||(zi.base44SharedInstances={}),zi.base44SharedInstances[n]||(zi.base44SharedInstances[n]={instance:t()}),zi.base44SharedInstances[n].instance}const Ab="__user_heartbeat_event__",jb="__initialization_event__",Lb="__session_duration_event__",Tm="analytics-enable",Nm="base44_analytics_session_id",Ib={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},Fb="analytics",Me=Ob(Fb,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...Ib,...Hb()}})),Db=({axiosClient:n,serverUrl:t,appId:s,userAuthModule:i})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:h}=Me.config;if(!(!((a=Me.config)===null||a===void 0)&&a.enabled)||bb)return{track:()=>{},cleanup:()=>{}};let p;const g=`${t}/api/apps/${s}/analytics/track/batch`,v=async T=>{await n.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:T}})},w=T=>{try{const A=JSON.stringify({events:T}),$=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(g,$)}catch{return!1}},b=async(T,A={})=>{if(T.length===0)return;const $=await Vb(i),V=T.map($b($));try{(!A.isBeacon||!w(V))&&await v(V)}catch{}},j=()=>{Om(b,{throttleTime:d,batchSize:h})},D=T=>{if(Me.requestsQueue.length>=u)return;const A=Bb();Me.requestsQueue.push({...T,...A}),j()},C=()=>{Om(b,{throttleTime:d,batchSize:h}),p=Am(D),Ub()},x=()=>{Pm(),p==null||p(),zb(D);const T=Me.requestsQueue.splice(0);b(T,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&C())},L=()=>{Pm(),p==null||p(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return j(),p=Am(D),Mb(D),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:D,cleanup:L}};function Pm(){Me.isProcessing=!1}async function Om(n,t){if(Me.isProcessing)return;Me.isProcessing=!0;const{throttleTime:s=1e3,batchSize:i=30}=t??{};for(;Me.isProcessing&&Me.requestsQueue.length>0;){const a=Me.requestsQueue.splice(0,i);a.length&&await n(a),await new Promise(u=>setTimeout(u,s))}Me.isProcessing=!1}function Am(n){var t;if(Me.isHeartBeatProcessing||((t=Me.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Me.isHeartBeatProcessing=!0;const s=setInterval(()=>{n({eventName:Ab})},Me.config.heartBeatInterval);return()=>{clearInterval(s),Me.isHeartBeatProcessing=!1}}function Mb(n){typeof window>"u"||Me.wasInitializationTracked||(Me.wasInitializationTracked=!0,n({eventName:jb,properties:{referrer:document==null?void 0:document.referrer}}))}function Ub(){typeof window>"u"||Me.sessionStartTime!==null||(Me.sessionStartTime=new Date().toISOString())}function zb(n){if(typeof window>"u"||Me.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Me.sessionStartTime).getTime();Me.sessionStartTime=null,n({eventName:Lb,properties:{sessionDuration:t}})}function Bb(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function $b(n){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...n})}let uc=null;async function Vb(n){if(!Me.sessionContext){if(!uc){const t=Ed();uc=n.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Me.sessionContext=await uc}return Me.sessionContext}function Hb(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(Tm);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(Tm);const i=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",i),{enabled:t==="true"}}function Ed(){if(typeof window>"u")return ac();try{const n=localStorage.getItem(Nm);if(!n){const t=ac();return localStorage.setItem(Nm,t),t}return n}catch{return ac()}}class Wb extends Error{constructor(t,s,i,a,u){super(t),this.name="Base44Error",this.status=s,this.code=i,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Hi({baseURL:n,headers:t={},token:s,interceptResponses:i=!0,onError:a}){const u=Ge.create({baseURL:n,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",Ed()));const h=Pb();if(d.requestId=h,km)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:n+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),i&&u.interceptors.response.use(d=>{var h;const p=(h=d.config)===null||h===void 0?void 0:h.requestId;try{km&&p&&window.parent.postMessage({type:"api-request-end",requestId:p,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,p,g,v,w,b,j,D;const C=((p=(h=d.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.message)||((v=(g=d.response)===null||g===void 0?void 0:g.data)===null||v===void 0?void 0:v.detail)||d.message,x=new Wb(C,(w=d.response)===null||w===void 0?void 0:w.status,(j=(b=d.response)===null||b===void 0?void 0:b.data)===null||j===void 0?void 0:j.code,(D=d.response)===null||D===void 0?void 0:D.data,d);return a==null||a(x),Promise.reject(x)}),u}function jm(n){const{axios:t,appId:s,getSocket:i}=n;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return Qb(t,s,u,i)}})}function qb(n){var t;try{const s=JSON.parse(n);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function Qb(n,t,s,i){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,h,p){const g={};return u&&(g.sort=u),d&&(g.limit=d),h&&(g.skip=h),p&&(g.fields=Array.isArray(p)?p.join(","):p),n.get(a,{params:g})},async filter(u,d,h,p,g){const v={q:JSON.stringify(u)};return d&&(v.sort=d),h&&(v.limit=h),p&&(v.skip=p),g&&(v.fields=Array.isArray(g)?g.join(","):g),n.get(a,{params:v})},async get(u){return n.get(`${a}/${u}`)},async create(u){return n.post(a,u)},async update(u,d){return n.put(`${a}/${u}`,d)},async delete(u){return n.delete(`${a}/${u}`)},async deleteMany(u){return n.delete(a,{data:u})},async bulkCreate(u){return n.post(`${a}/bulk`,u)},async updateMany(u,d){return n.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return n.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),n.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return i().subscribeToRoom(d,{update_model:g=>{var v;const w=qb(g.data);if(w){w.type!=="delete"&&(!((v=w.data)===null||v===void 0)&&v._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${w.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${w.id}")\` to fetch the full record.`);try{u(w)}catch(b){console.error("[Base44 SDK] Subscription callback error:",b)}}}})}}}function Kb(n,t){return{async call(s,i,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(i!=null&&i.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=a??{},p={...h,...u&&{path_params:u},...d&&{query_params:d}};return await n.post(`/apps/${t}/integrations/custom/${s}/${i}`,p)}}}function Lm(n,t){const s=Kb(n,t);return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let p,g;return h instanceof FormData||h&&Object.values(h).some(v=>v instanceof File)?(p=new FormData,Object.keys(h).forEach(v=>{h[v]instanceof File?p.append(v,h[v],h[v].name):typeof h[v]=="object"&&h[v]!==null?p.append(v,JSON.stringify(h[v])):p.append(v,h[v])}),g="multipart/form-data"):(p=h,g="application/json"),a==="Core"?n.post(`/apps/${t}/integration-endpoints/Core/${d}`,p||h,{headers:{"Content-Type":g}}):n.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,p||h,{headers:{"Content-Type":g}})}}})}})}function Gb(){return typeof window>"u"?!1:window!==window.parent}function Xb(n,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(n,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const p=()=>{window.removeEventListener("message",g),clearInterval(v),h.closed||h.close()},g=w=>{var b;if(w.origin!==s||w.source!==h||!(!((b=w.data)===null||b===void 0)&&b.access_token))return;p();const j=new URL(t),{access_token:D,is_new_user:C}=w.data;j.searchParams.set("access_token",D),C!=null&&j.searchParams.set("is_new_user",String(C)),window.location.href=j.toString()},v=setInterval(()=>{h.closed&&p()},500);window.addEventListener("message",g)}function Yb(n,t,s,i){return{async me(){return n.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return n.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${i.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),h=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let p;a==="sso"?p=`/apps/${s}/auth/sso/login`:p=`/apps/auth${a==="google"?"":`/${a}`}/login`;const g=`${i.appBaseUrl}/api${p}?${h}`;if(Gb()){const v=`${g}&popup_origin=${encodeURIComponent(window.location.origin)}`;return Xb(v,d,window.location.origin)}window.location.href=g},logout(a){if(delete n.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const u=a||window.location.href,d=`${i.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(n.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var h;try{const p=await n.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:g,user:v}=p;return g&&this.setToken(g),{access_token:g,user:v}}catch(p){throw((h=p.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),p}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return n.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return n.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return n.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return n.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return n.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return n.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return n.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function Jb(n,t){return{async getAccessToken(s){const i=`/apps/${t}/auth/sso/accesstoken/${s}`;return n.get(i)},async getIdToken(s){const i=`/apps/${t}/auth/sso/idtoken/${s}`;return n.get(i)}}}function Zb(n,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await n.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var i;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}},async getWorkspaceConnection(s){var i;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var i;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}}}}function eC(n,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await n.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Zr(n={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:i=!0,removeFromUrl:a=!0}=n;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(i&&tC(u,{storageKey:t}),a){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function tC(n,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!n)return!1;try{return window.localStorage.setItem(s,n),window.localStorage.setItem("token",n),!0}catch(i){return console.error("Error saving token to local storage:",i),!1}}function Im(n,t,s){const i=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([p,g])=>{g!=null&&d.set(p,String(g))})}return u&&new Headers(u).forEach((h,p)=>{d.set(p,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,p;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(h=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?h.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?h.append(g,JSON.stringify(d[g])):h.append(g,d[g])}),p="multipart/form-data"):(h=d,p="application/json"),n.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":p}})},async fetch(u,d={}){const p=`/functions${u.startsWith("/")?u:`/${u}`}`,g=a(d.headers),v={...d,headers:g};return await fetch(i(s==null?void 0:s.baseURL,p),v)}}}function Fm({axios:n,getSocket:t,appId:s,serverUrl:i,token:a}){const u=`/apps/${s}/agents`,d={},h=()=>n.get(`${u}/conversations`),p=C=>n.get(`${u}/conversations/${C}`);return{getConversations:h,getConversation:p,listConversations:C=>n.get(`${u}/conversations`,{params:C}),createConversation:C=>n.post(`${u}/conversations`,C),addMessage:async(C,x)=>n.post(`${u}/conversations/v2/${C.id}/messages`,x),subscribeToConversation:(C,x)=>{const S=`/agent-conversations/${C}`,L=t(),T=p(C).then(A=>(d[C]=A,A));return L.subscribeToRoom(S,{connect:()=>{},update_model:async({data:A})=>{const $=JSON.parse(A);if($._message){await T;const V=$._message,G=d[C];if(G){const B=G.messages||[],oe=B.findIndex(Se=>Se.id===V.id),ce=oe!==-1?B.map((Se,Ne)=>Ne===oe?V:Se):[...B,V];d[C]={...G,messages:ce},x==null||x(d[C])}}}})},getWhatsAppConnectURL:C=>{const x=`${i}/api/apps/${s}/agents/${encodeURIComponent(C)}/whatsapp`,S=a??Zr();return S?`${x}?token=${S}`:x},getTelegramConnectURL:C=>{const x=`${i}/api/apps/${s}/agents/${encodeURIComponent(C)}/telegram`,S=a??Zr();return S?`${x}?token=${S}`:x}}}function Dm({serverUrl:n,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${n}/api/apps/${s}/ai/openai/v1`,token:(a=t??Zr())!==null&&a!==void 0?a:""}}}}function Mm(n,t){const s=`/app-logs/${t}`;return{async logUserInApp(i){await n.post(`${s}/log-user-in-app/${i}`)},async fetchLogs(i={}){return await n.get(s,{params:i})},async getStats(i={}){return await n.get(`${s}/stats`,{params:i})}}}function nC(n,t){return{async inviteUser(s,i){if(i!=="user"&&i!=="admin")throw new Error(`Invalid role: "${i}". Role must be either "user" or "admin".`);return await n.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:i})}}}const xn=Object.create(null);xn.open="0";xn.close="1";xn.ping="2";xn.pong="3";xn.message="4";xn.upgrade="5";xn.noop="6";const za=Object.create(null);Object.keys(xn).forEach(n=>{za[xn[n]]=n});const Vc={type:"error",data:"parser error"},tv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",nv=typeof ArrayBuffer=="function",rv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Sd=({type:n,data:t},s,i)=>tv&&t instanceof Blob?s?i(t):Um(t,i):nv&&(t instanceof ArrayBuffer||rv(t))?s?i(t):Um(new Blob([t]),i):i(xn[n]+(t||"")),Um=(n,t)=>{const s=new FileReader;return s.onload=function(){const i=s.result.split(",")[1];t("b"+(i||""))},s.readAsDataURL(n)};function zm(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let cc;function rC(n,t){if(tv&&n.data instanceof Blob)return n.data.arrayBuffer().then(zm).then(t);if(nv&&(n.data instanceof ArrayBuffer||rv(n.data)))return t(zm(n.data));Sd(n,!1,s=>{cc||(cc=new TextEncoder),t(cc.encode(s))})}const Bm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n{let t=n.length*.75,s=n.length,i,a=0,u,d,h,p;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const g=new ArrayBuffer(t),v=new Uint8Array(g);for(i=0;i>4,v[a++]=(d&15)<<4|h>>2,v[a++]=(h&3)<<6|p&63;return g},iC=typeof ArrayBuffer=="function",_d=(n,t)=>{if(typeof n!="string")return{type:"message",data:sv(n,t)};const s=n.charAt(0);return s==="b"?{type:"message",data:oC(n.substring(1),t)}:za[s]?n.length>1?{type:za[s],data:n.substring(1)}:{type:za[s]}:Vc},oC=(n,t)=>{if(iC){const s=sC(n);return sv(s,t)}else return{base64:!0,data:n}},sv=(n,t)=>{switch(t){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},iv="",aC=(n,t)=>{const s=n.length,i=new Array(s);let a=0;n.forEach((u,d)=>{Sd(u,!1,h=>{i[d]=h,++a===s&&t(i.join(iv))})})},lC=(n,t)=>{const s=n.split(iv),i=[];for(let a=0;a{const i=s.length;let a;if(i<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,i);else if(i<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,i)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(i))}n.data&&typeof n.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let dc;function Aa(n){return n.reduce((t,s)=>t+s.length,0)}function ja(n,t){if(n[0].length===t)return n.shift();const s=new Uint8Array(t);let i=0;for(let a=0;aMath.pow(2,21)-1){h.enqueue(Vc);break}a=v*Math.pow(2,32)+g.getUint32(4),i=3}else{if(Aa(s)n){h.enqueue(Vc);break}}}})}const ov=4;function Ye(n){if(n)return dC(n)}function dC(n){for(var t in Ye.prototype)n[t]=Ye.prototype[t];return n}Ye.prototype.on=Ye.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};Ye.prototype.once=function(n,t){function s(){this.off(n,s),t.apply(this,arguments)}return s.fn=t,this.on(n,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var i,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Gt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),fC="arraybuffer";function av(n,...t){return t.reduce((s,i)=>(n.hasOwnProperty(i)&&(s[i]=n[i]),s),{})}const hC=Gt.setTimeout,pC=Gt.clearTimeout;function nl(n,t){t.useNativeTimers?(n.setTimeoutFn=hC.bind(Gt),n.clearTimeoutFn=pC.bind(Gt)):(n.setTimeoutFn=Gt.setTimeout.bind(Gt),n.clearTimeoutFn=Gt.clearTimeout.bind(Gt))}const mC=1.33;function gC(n){return typeof n=="string"?yC(n):Math.ceil((n.byteLength||n.size)*mC)}function yC(n){let t=0,s=0;for(let i=0,a=n.length;i=57344?s+=3:(i++,s+=4);return s}function lv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function vC(n){let t="";for(let s in n)n.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return t}function wC(n){let t={},s=n.split("&");for(let i=0,a=s.length;i{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||s()})),this.writable||(i++,this.once("drain",function(){--i||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};lC(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,aC(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=lv()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let uv=!1;try{uv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const SC=uv;function _C(){}class bC extends EC{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let i=location.port;i||(i=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,s){const i=this.request({method:"POST",data:t});i.on("success",s),i.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,i)=>{this.onError("xhr poll error",s,i)}),this.pollXhr=t}}class wn extends Ye{constructor(t,s,i){super(),this.createRequest=t,nl(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const s=av(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&i.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var a;i.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=wn.requestsCount++,wn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=_C,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}wn.requestsCount=0;wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",$m);else if(typeof addEventListener=="function"){const n="onpagehide"in Gt?"pagehide":"unload";addEventListener(n,$m,!1)}}function $m(){for(let n in wn.requests)wn.requests.hasOwnProperty(n)&&wn.requests[n].abort()}const CC=(function(){const n=cv({xdomain:!1});return n&&n.responseType!==null})();class kC extends bC{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=CC&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new wn(cv,this.uri(),t)}}function cv(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||SC))return new XMLHttpRequest}catch{}if(!t)try{return new Gt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const dv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class RC extends bd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,i=dv?{}:av(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,i)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(i,u)}catch{}a&&tl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=lv()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const fc=Gt.WebSocket||Gt.MozWebSocket;class TC extends RC{createSocket(t,s,i){return dv?new fc(t,s,i):s?new fc(t,s):new fc(t)}doWrite(t,s){this.ws.send(s)}}class NC extends bd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=cC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(s).getReader(),a=uC();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{i.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&tl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const PC={websocket:TC,webtransport:NC,polling:kC},OC=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,AC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Hc(n){if(n.length>8e3)throw"URI too long";const t=n,s=n.indexOf("["),i=n.indexOf("]");s!=-1&&i!=-1&&(n=n.substring(0,s)+n.substring(s,i).replace(/:/g,";")+n.substring(i,n.length));let a=OC.exec(n||""),u={},d=14;for(;d--;)u[AC[d]]=a[d]||"";return s!=-1&&i!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=jC(u,u.path),u.queryKey=LC(u,u.query),u}function jC(n,t){const s=/\/{2,9}/g,i=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function LC(n,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,a,u){a&&(s[a]=u)}),s}const Wc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ba=[];Wc&&addEventListener("offline",()=>{Ba.forEach(n=>n())},!1);class xr extends Ye{constructor(t,s){if(super(),this.binaryType=fC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const i=Hc(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=Hc(s.host).host);nl(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{const a=i.prototype.name;this.transports.push(a),this._transportsByName[a]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=wC(this.opts.query)),Wc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ba.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=ov,s.transport=t,this.id&&(s.sid=this.id);const i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&xr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",xr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,tl(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,a){if(typeof s=="function"&&(a=s,s=void 0),typeof i=="function"&&(a=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const u={type:t,data:s,options:i};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(xr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=Ba.indexOf(this._offlineEventListener);i!==-1&&Ba.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}xr.protocol=ov;class IC extends xr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{i||(s.send([{type:"ping",data:"probe"}]),s.once("packet",w=>{if(!i)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;xr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(v(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=s.name,this.emitReserved("upgradeError",b)}}))};function u(){i||(i=!0,v(),s.close(),s=null)}const d=w=>{const b=new Error("probe error: "+w);b.transport=s.name,u(),this.emitReserved("upgradeError",b)};function h(){d("transport closed")}function p(){d("socket closed")}function g(w){s&&w.name!==s.name&&u()}const v=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",h),this.off("close",p),this.off("upgrading",g)};s.once("open",a),s.once("error",d),s.once("close",h),this.once("close",p),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let i=0;iPC[u]).filter(u=>!!u)),super(i?a:t,a)}};function DC(n,t="",s){let i=n;s=s||typeof location<"u"&&location,n==null&&(n=s.protocol+"//"+s.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=s.protocol+n:n=s.host+n),/^(https?|wss?):\/\//.test(n)||(typeof s<"u"?n=s.protocol+"//"+n:n="https://"+n),i=Hc(n)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const u=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+u+":"+i.port+t,i.href=i.protocol+"://"+u+(s&&s.port===i.port?"":":"+i.port),i}const MC=typeof ArrayBuffer=="function",UC=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,fv=Object.prototype.toString,zC=typeof Blob=="function"||typeof Blob<"u"&&fv.call(Blob)==="[object BlobConstructor]",BC=typeof File=="function"||typeof File<"u"&&fv.call(File)==="[object FileConstructor]";function Cd(n){return MC&&(n instanceof ArrayBuffer||UC(n))||zC&&n instanceof Blob||BC&&n instanceof File}function $a(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let s=0,i=n.length;s=0&&n.numthis.opts.maxAttachments)throw new Error("too many attachments");i.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););i.nsp=t.substring(u,s)}else i.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}i.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(kd.isPayloadValid(i.type,u))i.data=u;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Ae.CONNECT:return Vm(s);case Ae.DISCONNECT:return s===void 0;case Ae.CONNECT_ERROR:return typeof s=="string"||Vm(s);case Ae.EVENT:case Ae.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&HC.indexOf(s[0])===-1);case Ae.ACK:case Ae.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class qC{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=VC(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const QC=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function Vm(n){return Object.prototype.toString.call(n)==="[object Object]"}const KC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:kd,Encoder:WC,get PacketType(){return Ae}},Symbol.toStringTag,{value:"Module"}));function un(n,t,s){return n.on(t,s),function(){n.off(t,s)}}const GC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class hv extends Ye{constructor(t,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[un(t,"open",this.onopen.bind(this)),un(t,"packet",this.onpacket.bind(this)),un(t,"error",this.onerror.bind(this)),un(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var i,a,u;if(GC.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Ae.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const v=this.ids++,w=s.pop();this._registerAckCallback(v,w),d.id=v}const h=(a=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||a===void 0?void 0:a.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var i;const a=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((i,a)=>{const u=(d,h)=>d?a(d):i(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ae.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ae.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ae.EVENT:case Ae.BINARY_EVENT:this.onevent(t);break;case Ae.ACK:case Ae.BINARY_ACK:this.onack(t);break;case Ae.DISCONNECT:this.ondisconnect();break;case Ae.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const i of s)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let i=!1;return function(...a){i||(i=!0,s.packet({type:Ae.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ae.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let i=0;i0&&n.jitter<=1?n.jitter:0,this.attempts=0}Js.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-s:n+s}return Math.min(n,this.max)|0};Js.prototype.reset=function(){this.attempts=0};Js.prototype.setMin=function(n){this.ms=n};Js.prototype.setMax=function(n){this.max=n};Js.prototype.setJitter=function(n){this.jitter=n};class Kc extends Ye{constructor(t,s){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,nl(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((i=s.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Js({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||KC;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new FC(this.uri,this.opts);const s=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const a=un(s,"open",function(){i.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=un(s,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(un(t,"ping",this.onping.bind(this)),un(t,"data",this.ondata.bind(this)),un(t,"error",this.onerror.bind(this)),un(t,"close",this.onclose.bind(this)),un(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){tl(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new hv(this,t,s),this.nsps[t]=i),i}_destroy(t){const s=Object.keys(this.nsps);for(const i of s)if(this.nsps[i].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Bi={};function Va(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const s=DC(n,t.path||"/socket.io"),i=s.source,a=s.id,u=s.path,d=Bi[a]&&u in Bi[a].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let p;return h?p=new Kc(i,t):(Bi[a]||(Bi[a]=new Kc(i,t)),p=Bi[a]),s.query&&!t.query&&(t.query=s.queryKey),p.socket(s.path,t)}Object.assign(Va,{Manager:Kc,Socket:hv,io:Va,connect:Va});const XC=250;function Hm(n,t){var s;const i=(s=n.token)!==null&&s!==void 0?s:Zr(),a={app_id:n.appId,token:i};i||(a.anonymous_id=Ed());const u=Va(n.serverUrl,{path:n.mountPath,transports:n.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function YC({config:n}){let t={...n};const s={},i={},a={connect:async()=>{const S=[];Object.keys(s).forEach(L=>{const T=b(L);T.length!==0&&(g(L),T.forEach(({connect:A})=>{const $=async()=>A==null?void 0:A();S.push($())}))}),await Promise.all(S)},update_model:async S=>{const T=b(S.room).map(A=>{var $;return($=A.update_model)===null||$===void 0?void 0:$.call(A,S)});await Promise.all(T)},error:async S=>{console.error("error",S);const L=Object.values(s).flat().map(T=>{var A;return(A=T.error)===null||A===void 0?void 0:A.call(T,S)});await Promise.all(L)}};let u=Hm(n,a);function d(){h()}function h(){D(),u&&u.disconnect()}function p(S){d(),t={...t,...S},u=Hm(t,a)}function g(S){u.emit("join",S)}function v(S){u.emit("leave",S)}async function w(S,L){var T;const A=JSON.stringify(L);return(T=a.update_model)===null||T===void 0?void 0:T.call(a,{room:S,data:A})}function b(S){var L;return(L=s[S])!==null&&L!==void 0?L:[]}function j(S){const L=i[S];L&&(clearTimeout(L),delete i[S])}function D(){Object.keys(i).forEach(S=>{var L,T;clearTimeout(i[S]),delete i[S],((T=(L=s[S])===null||L===void 0?void 0:L.length)!==null&&T!==void 0?T:0)===0&&delete s[S]})}function C(S){j(S),i[S]=setTimeout(()=>{var L,T;delete i[S],!(((T=(L=s[S])===null||L===void 0?void 0:L.length)!==null&&T!==void 0?T:0)>0)&&(v(S),delete s[S])},XC)}return{socket:u,subscribeToRoom:(S,L)=>{s[S]?j(S):(g(S),s[S]=[]),s[S].push(L);let T=!1;return()=>{var A,$;T||(T=!0,s[S]=($=(A=s[S])===null||A===void 0?void 0:A.filter(V=>V!==L))!==null&&$!==void 0?$:[],s[S].length===0&&C(S))}},updateConfig:p,updateModel:w,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var pv=class extends Event{constructor(t,s){super("error",s);Ie(this,"message");Ie(this,"error");this.message=t.message,this.error=t}},mv=class extends Event{constructor(t=1e3,s="",i){super("close",i);Ie(this,"code");Ie(this,"reason");Ie(this,"wasClean",!0);this.code=t,this.reason=s}},hc={Event,ErrorEvent:pv,CloseEvent:mv};function JC(n,t){if(!n)throw new Error(t)}function ZC(n){return new n.constructor(n.type,n)}function ek(n){return"data"in n?new MessageEvent(n.type,n):"code"in n||"reason"in n?new mv(n.code||1999,n.reason||"unknown reason",n):"error"in n?new pv(n.error,n):new Event(n.type,n)}var ag,tk=typeof process<"u"&&typeof((ag=process.versions)==null?void 0:ag.node)<"u"&&typeof document>"u",La=tk?ek:ZC,Dr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Wm=!1,nk=class zr extends EventTarget{constructor(s,i,a={}){super();Ie(this,"_ws");Ie(this,"_retryCount",-1);Ie(this,"_uptimeTimeout");Ie(this,"_connectTimeout");Ie(this,"_shouldReconnect",!0);Ie(this,"_connectLock",!1);Ie(this,"_binaryType","blob");Ie(this,"_closeCalled",!1);Ie(this,"_messageQueue",[]);Ie(this,"_url");Ie(this,"_protocols");Ie(this,"_options");Ie(this,"onclose",null);Ie(this,"onerror",null);Ie(this,"onmessage",null);Ie(this,"onopen",null);Ie(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:i=Dr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),i),JC(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(La(s))});Ie(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(La(s))});Ie(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(La(s)),this._connect()});Ie(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(La(s))});this._url=s,this._protocols=i,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return zr.CONNECTING}get OPEN(){return zr.OPEN}get CLOSING(){return zr.CLOSING}get CLOSED(){return zr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((i,a)=>(typeof a=="string"?i+=a.length:a instanceof Blob?i+=a.size:i+=a.byteLength,i),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?zr.CLOSED:zr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,i){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,i)}reconnect(s,i){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,i),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:i=Dr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Dr.reconnectionDelayGrowFactor,minReconnectionDelay:i=Dr.minReconnectionDelay,maxReconnectionDelay:a=Dr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=i*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const i=s();if(!i)return Promise.resolve(null);if(typeof i=="string"||Array.isArray(i))return Promise.resolve(i);if(i.then)return i}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const i=s();if(typeof i=="string")return Promise.resolve(i);if(i.then)return i}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Dr.maxRetries,connectionTimeout:i=Dr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Wm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Wm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),i)}).catch(a=>{this._connectLock=!1,this._handleError(new hc.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new hc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,i){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,i),this._handleClose(new hc.CloseEvent(s,i,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var rk=n=>n[1]!==null&&n[1]!==void 0;function sk(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let n=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let i=Math.random()*16;return n>0?(i=(n+i)%16|0,n=Math.floor(n/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),(s==="x"?i:i&3|8).toString(16)})}function gv(n,t,s={}){const{host:i,path:a,protocol:u,room:d,party:h,query:p}=n;let g=i.replace(/^(http|https|ws|wss):\/\//,"");if(g.endsWith("/")&&(g=g.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const v=h??"main",w=a?`/${a}`:"",b=u||(g.startsWith("localhost:")||g.startsWith("127.0.0.1:")||g.startsWith("192.168.")||g.startsWith("10.")||g.startsWith("172.")&&g.split(".")[1]>="16"&&g.split(".")[1]<="31"||g.startsWith("[::ffff:7f00:1]:")?t:t+"s"),j=`${b}://${g}/${h?`parties/${h}`:"party"}/${d}${w}`,D=(x={})=>`${j}?${new URLSearchParams([...Object.entries(s),...Object.entries(x).filter(rk)])}`,C=typeof p=="function"?async()=>D(await p()):D(p);return{host:g,path:w,room:d,name:v,protocol:b,partyUrl:j,urlProvider:C}}var ik=class extends nk{constructor(t){const s=qm(t);super(s.urlProvider,s.protocols,s.socketOptions);Ie(this,"_pk");Ie(this,"_pkurl");Ie(this,"name");Ie(this,"room");Ie(this,"host");Ie(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=qm({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:i,name:a,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=i,this.name=a,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const i=gv(t,"http"),a=typeof i.urlProvider=="string"?i.urlProvider:await i.urlProvider();return(t.fetch??fetch)(a,s)}};function qm(n){const{id:t,host:s,path:i,party:a,room:u,protocol:d,query:h,protocols:p,...g}=n,v=t||sk(),w=gv(n,"ws",{_pk:v});return{_pk:v,_pkurl:w.partyUrl,name:w.name,room:w.room,host:w.host,path:w.path,protocols:p,socketOptions:g,urlProvider:w.urlProvider}}const ok=1e3,ak=3e3;class lk{constructor(t,s,i,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new ik({host:i.host,party:t,room:s,id:this.id,query:()=>{const v=i.getAuthToken();return{app_id:i.appId,handler:t,...v?{token:v}:{},...i.functionsVersion?{fv:i.functionsVersion}:{}}}});this.ws=h;let p=Date.now();const g=()=>{p=Date.now()};h.addEventListener("open",g),h.addEventListener("message",v=>{g();let w;try{w=JSON.parse(v.data)}catch{return}if((w&&typeof w=="object"?w.type:void 0)!=="__pong")for(const j of this.listeners)j(w)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>ak){g(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},ok)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function uk(n,t,s,i){let a=null;return{connect(u){if(a)return a;const d=new lk(n,t,s,u,()=>{i.delete(d),a===d&&(a=null)});return a=d,i.add(d),d}}}function ck(n,t){return n&&!n.startsWith("/")?n:t??n}function dk(n){const t=new Set;return{module:new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"))return u=>uk(a,u,n,t)}}),closeAll:()=>{for(const i of[...t])i.close()}}}function fk(n){var t,s,i;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:g,options:v,functionsVersion:w,headers:b}=n,j=typeof g=="string"?g:"",D={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let C=null;const x=()=>(C||(C=YC({config:D})),C),S={...b,"X-App-Id":String(u)},L=w?{...S,"Base44-Functions-Version":w}:S,T=Hi({baseURL:`${a}/api`,headers:S,token:d,onError:v==null?void 0:v.onError}),A=Hi({baseURL:`${a}/api`,headers:L,token:d,interceptResponses:!1,onError:v==null?void 0:v.onError}),$={...S,...d?{"on-behalf-of":`Bearer ${d}`}:{}},V=Hi({baseURL:`${a}/api`,headers:$,token:h,onError:v==null?void 0:v.onError}),G=Hi({baseURL:`${a}/api`,headers:L,token:h,interceptResponses:!1}),B=Yb(T,A,u,{appBaseUrl:j});if(typeof window<"u"){const Ee=d||Zr();Ee&&B.setToken(Ee)}const oe=dk({appId:u,host:ck(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:w,getAuthToken:()=>d||Zr()}),ce={entities:jm({axios:T,appId:u,getSocket:x}),integrations:Lm(T,u),connectors:eC(T,u),auth:B,functions:Im(A,u,{getAuthHeaders:()=>{const Ee={},J=d||Zr();return J&&(Ee.Authorization=`Bearer ${J}`),Ee},baseURL:(s=A.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Fm({axios:T,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Dm({serverUrl:a,token:d,appId:u}),appLogs:Mm(T,u),users:nC(T,u),analytics:Db({axiosClient:T,serverUrl:a,appId:u,userAuthModule:B}),actors:oe.module,cleanup:()=>{ce.analytics.cleanup(),oe.closeAll(),C&&C.disconnect()}},Se={entities:jm({axios:V,appId:u,getSocket:x}),integrations:Lm(V,u),sso:Jb(V,u),connectors:Zb(V,u),functions:Im(G,u,{getAuthHeaders:()=>{const Ee={};return h&&(Ee.Authorization=`Bearer ${h}`),Ee},baseURL:(i=G.defaults)===null||i===void 0?void 0:i.baseURL}),agents:Fm({axios:V,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Dm({serverUrl:a,token:h,appId:u}),appLogs:Mm(V,u),cleanup:()=>{C&&C.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await ce.auth.isAuthenticated()||ce.auth.redirectToLogin(window.location.href)}catch(Ee){console.error("Authentication check failed:",Ee),ce.auth.redirectToLogin(window.location.href)}},0),{...ce,setToken(Ee){ce.auth.setToken(Ee),C&&C.updateConfig({token:Ee}),D.token=Ee},getConfig(){return{serverUrl:a,appId:u,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Se}}}const yv=typeof window>"u",hk=yv?{localStorage:new Map}:window,Gi=hk.localStorage,pk=n=>n.replace(/([A-Z])/g,"_$1").toLowerCase(),js=(n,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(yv)return t;const i=`base44_${pk(n)}`,a=new URLSearchParams(window.location.search),u=a.get(n);if(s){a.delete(n);const h=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return Gi.setItem(i,u),u;if(t)return Gi.setItem(i,t),t;const d=Gi.getItem(i);return d||null},mk=()=>(js("clear_access_token")==="true"&&(Gi.removeItem("base44_access_token"),Gi.removeItem("token")),{appId:js("app_id",{defaultValue:"6a7a8f88a5226fc8d9ff9bd0"}),token:js("access_token",{removeFromUrl:!0}),fromUrl:js("from_url",{defaultValue:window.location.href}),functionsVersion:js("functions_version",{defaultValue:"prod"}),appBaseUrl:js("app_base_url",{defaultValue:void 0})}),qi={...mk()},{appId:gk,token:yk,functionsVersion:vk,appBaseUrl:wk}=qi,Qi=fk({appId:gk,token:yk,functionsVersion:vk,serverUrl:"",requiresAuth:!1,appBaseUrl:wk});function xk({}){var a;const t=Gs().pathname.substring(1),{data:s,isFetched:i}=wE({queryKey:["user"],queryFn:async()=>{try{return{user:await Qi.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return m.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:m.jsx("div",{className:"max-w-md w-full",children:m.jsxs("div",{className:"text-center space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),m.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),m.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",m.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),i&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&m.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:m.jsxs("div",{className:"flex items-start space-x-3",children:[m.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:m.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),m.jsxs("div",{className:"text-left space-y-1",children:[m.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),m.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),m.jsx("div",{className:"pt-6",children:m.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[m.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const vv=_.createContext(),Ek=({children:n})=>{const[t,s]=_.useState(null),[i,a]=_.useState(!1),[u,d]=_.useState(!0),[h,p]=_.useState(!0),[g,v]=_.useState(null),[w,b]=_.useState(!1),[j,D]=_.useState(null);_.useEffect(()=>{C()},[]);const C=async()=>{var T,A;try{p(!0),v(null);const $=Hi({baseURL:"/api/apps/public",headers:{"X-App-Id":qi.appId},token:qi.token,interceptResponses:!0});try{const V=await $.get(`/prod/public-settings/by-id/${qi.appId}`);D(V),qi.token?await x():(d(!1),a(!1),b(!0)),p(!1)}catch(V){if(console.error("App state check failed:",V),V.status===403&&((A=(T=V.data)==null?void 0:T.extra_data)!=null&&A.reason)){const G=V.data.extra_data.reason;v(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:V.message})}else v({type:"unknown",message:V.message||"Failed to load app"});p(!1),d(!1)}}catch($){console.error("Unexpected error:",$),v({type:"unknown",message:$.message||"An unexpected error occurred"}),p(!1),d(!1)}},x=async()=>{try{d(!0);const T=await Qi.auth.me();s(T),a(!0),d(!1),b(!0)}catch(T){console.error("User auth check failed:",T),d(!1),a(!1),b(!0),(T.status===401||T.status===403)&&v({type:"auth_required",message:"Authentication required"})}},S=(T=!0)=>{s(null),a(!1),T?Qi.auth.logout(window.location.href):Qi.auth.logout()},L=()=>{Qi.auth.redirectToLogin(window.location.href)};return m.jsx(vv.Provider,{value:{user:t,isAuthenticated:i,isLoadingAuth:u,isLoadingPublicSettings:h,authError:g,appPublicSettings:j,authChecked:w,logout:S,navigateToLogin:L,checkUserAuth:x,checkAppState:C},children:n})},Sk=()=>{const n=_.useContext(vv);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n},_k=()=>m.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:m.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:m.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),m.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),m.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),m.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[m.jsx("p",{children:"If you believe this is an error, you can:"}),m.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[m.jsx("li",{children:"Verify you are logged in with the correct account"}),m.jsx("li",{children:"Contact the app administrator for access"}),m.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),bk=n=>{const t=n.slice(1);try{return decodeURIComponent(t)}catch{return t}};function Ck(){const{pathname:n,hash:t}=Gs(),s=XE();return _.useEffect(()=>{if(s!=="POP"){if(t){const i=bk(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(i))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[n,t,s]),null}const Qm=[{label:"About",href:"#"},{label:"Our Business",href:"#"},{label:"Asset Management",href:"#"},{label:"Governance",href:"#"},{label:"Sustainability",href:"#"},{label:"Investors",href:"#"},{label:"Resources",href:"#"},{label:"Contact",href:"#"}],kk=["Investor Relations","Corporate Governance","Financial Information"];function Rk(){const[n,t]=_.useState(!1),[s,i]=_.useState(!1);return _.useEffect(()=>{const a=()=>t(window.scrollY>12);return a(),window.addEventListener("scroll",a,{passive:!0}),()=>window.removeEventListener("scroll",a)},[]),m.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 transition-all duration-300",style:{backgroundColor:n?"#F7F6F2":"transparent",borderBottom:n?"1px solid #C9C7C0":"1px solid transparent",boxShadow:n?"0 1px 18px rgba(23,32,31,0.06)":"none"},children:[m.jsxs("div",{className:"hidden lg:flex justify-end items-center gap-6 px-[60px] h-7 text-[11px] tracking-[0.12em] uppercase transition-colors",style:{color:n?"#5D625E":"rgba(247,246,242,0.7)",borderBottom:n?"1px solid #ECEAE4":"1px solid rgba(201,199,192,0.18)"},children:[kk.map(a=>m.jsx("a",{href:"#",className:"hover:text-[#8C7355] transition-colors",children:a},a)),m.jsx("span",{className:"opacity-40",children:"|"}),m.jsx("button",{className:"hover:text-[#8C7355] transition-colors",children:"EN"}),m.jsx("span",{className:"opacity-40",children:"/"}),m.jsx("button",{className:"hover:text-[#8C7355] transition-colors",children:"AR"})]}),m.jsxs("div",{className:"flex items-center justify-between px-[60px] h-[68px]",children:[m.jsxs(bS,{to:"/",className:"flex items-center gap-2.5",children:[m.jsx("span",{className:"text-[19px] font-semibold tracking-[0.16em]",style:{color:n?"#17201F":"#F7F6F2"},children:"ALRAZAH"}),m.jsx("span",{className:"text-[10px] tracking-[0.2em] uppercase hidden sm:inline",style:{color:n?"#8C7355":"rgba(247,246,242,0.55)"},children:"Holding"})]}),m.jsx("nav",{className:"hidden lg:flex items-center gap-7 text-[13px] font-medium",style:{color:n?"#202522":"rgba(247,246,242,0.92)"},children:Qm.map(a=>m.jsx("a",{href:a.href,className:"relative py-2 hover:text-[#8C7355] transition-colors",children:a.label},a.label))}),m.jsx("button",{className:"lg:hidden p-2",onClick:()=>i(a=>!a),style:{color:n?"#17201F":"#F7F6F2"},"aria-label":"Toggle menu",children:s?m.jsx(zg,{size:22}):m.jsx(Bx,{size:22})})]}),s&&m.jsx("div",{className:"lg:hidden bg-[#F7F6F2] border-t border-[#C9C7C0]",children:m.jsx("nav",{className:"flex flex-col px-6 py-4",children:Qm.map(a=>m.jsx("a",{href:a.href,className:"py-3 text-[15px] text-[#202522] border-b border-[#ECEAE4]",children:a.label},a.label))})})]})}const Tk=[{title:"ALRAZAH",body:"Qatari investment and holding company.",links:[]},{title:"ABOUT",links:["Overview","Leadership","Governance","Sustainability","Our Approach"]},{title:"OUR BUSINESS",links:["Real Estate","Logistics & Industrial","Asset Management","Project Management"]},{title:"INVESTOR RELATIONS",links:["Financial Information","Corporate Governance","Disclosures","Investor Information"]}],Nk=["Privacy Policy","Terms of Use","Accessibility","Contact","Arabic"];function Pk(){return m.jsxs("footer",{className:"bg-[#17201F] text-[#F7F6F2]",children:[m.jsx("div",{className:"max-w-[1360px] mx-auto px-[60px] py-20",children:m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 lg:gap-8",children:Tk.map((n,t)=>m.jsxs("div",{className:t===0?"lg:pr-8":"",children:[m.jsx("h4",{className:"text-[11px] font-semibold tracking-[0.18em] uppercase text-[#8C7355] mb-6",children:n.title}),n.body&&m.jsx("p",{className:"text-[14px] leading-[1.7] text-[#A8AEAB] max-w-[260px]",children:n.body}),m.jsx("ul",{className:"space-y-3",children:n.links.map(s=>m.jsx("li",{children:m.jsxs("a",{href:"#",className:"group inline-flex items-center gap-1.5 text-[14px] text-[#C9C7C0] hover:text-[#F7F6F2] transition-colors",children:[s,m.jsx(Ux,{size:12,className:"opacity-0 -translate-x-1 group-hover:opacity-100 group-hover:translate-x-0 transition-all"})]})},s))})]},n.title))})}),m.jsx("div",{className:"border-t border-[#263331]",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px] py-6 flex flex-col md:flex-row items-center justify-between gap-4",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 text-[12px] text-[#5D625E]",children:Nk.map((n,t)=>m.jsxs(jn.Fragment,{children:[t>0&&m.jsx("span",{className:"opacity-30 hidden md:inline",children:"·"}),m.jsx("a",{href:"#",className:"hover:text-[#C9C7C0] transition-colors",children:n})]},n))}),m.jsx("p",{className:"text-[12px] text-[#5D625E]",children:"© Alrazah Holding. All rights reserved."})]})})]})}function Ok(n){const[t,s]=_.useState(null);return _.useLayoutEffect(()=>{const i=n.current;if(!i)return;const a=i.getBoundingClientRect();s({width:a.width,height:a.height});const u=new ResizeObserver(([d])=>{const{width:h,height:p}=d.contentRect;s({width:h,height:p})});return u.observe(i),()=>u.disconnect()},[n]),t}const Ak={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},jk=1024,Ln={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},Lk=[1,2,3],Ik=6e3;function Fk(n){try{const t=new URL(n);if(t.protocol!=="https:"||t.username||t.password||t.port&&t.port!=="443")return null;const s=Ak[t.hostname];if(!s)return null;const i=t.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),a=i?i[1]:t.pathname,u=a.split("/").pop();return!a.startsWith(s)||!u||!/\.[a-z0-9]+$/i.test(u)||/\.svg$/i.test(u)?null:{baseUrl:`${t.origin}${a}`,filename:u}}catch{return null}}const Km=n=>Math.min(Math.max(Math.round(n),1),Ik),Gm=n=>Math.min(1,Math.max(0,n));function Gc({baseUrl:n,filename:t},{width:s,height:i,crop:a,focalPoint:u,quality:d}){const h=[`w_${Km(s)}`,`h_${Km(i||s)}`];a&&h.push(u?`fp_${Gm(u.x).toFixed(2)}_${Gm(u.y).toFixed(2)}`:"al_c"),h.push(`q_${d}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const p=/\.gif$/i.test(t)?t:t.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${n}/v1/${a?"fill":"fit"}/${h.join(",")}/${p}`}function Dk(n,t){return Lk.map(s=>`${Gc(n,{...t,width:t.width*s,height:t.height?t.height*s:void 0})} ${s}x`).join(", ")}function Mk(n,t){return(t==null?void 0:t.baseUrl)||n}function Uk(n){return n===Ln.OPTIMIZED?Ln.ORIGINAL:Ln.FALLBACK}const pc="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",wv=_.forwardRef(({aspectRatio:n,className:t,style:s,children:i},a)=>m.jsx("span",{ref:a,className:Sr("inline-block relative",t),style:{aspectRatio:n,...s},children:i}));wv.displayName="ImageWrapper";const xv=_.forwardRef(({parsed:n,fittingType:t,focalPoint:s,quality:i,className:a,style:u,aspectRatio:d,onLoad:h,...p},g)=>{const v=_.useRef(null),w=_.useRef(null),b=Ok(v),[j,D]=_.useState(!1);_.useImperativeHandle(g,()=>w.current),_.useEffect(()=>{D(!1)},[n.baseUrl]);const C=t!=="fit",x=b&&{width:b.width||jk,height:b.height?b.height:void 0,crop:C,focalPoint:C?s:void 0,quality:i};return m.jsxs(wv,{ref:v,aspectRatio:d,className:a,style:u,children:[x&&!j&&m.jsx("img",{src:Gc(n,{...x,width:20,height:x.height?Math.max(1,Math.round(20*x.height/x.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:t==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),x&&m.jsx("img",{ref:w,src:Gc(n,x),srcSet:Dk(n,x),loading:"lazy",className:Sr("w-full h-full inset-0 absolute",t==="fit"?"object-contain":"object-cover"),onLoad:S=>{D(!0),h==null||h(S)},...p})]})});xv.displayName="ResponsiveImage";const Rd=_.forwardRef(({src:n,fittingType:t="fill",originWidth:s,originHeight:i,focalPointX:a,focalPointY:u,quality:d=90,onError:h,...p},g)=>{const v=n&&n!==pc?Fk(n):null,w=v?Ln.OPTIMIZED:Ln.ORIGINAL,[b,j]=_.useState({src:n,mode:w}),D=b.src===n?b.mode:w;_.useEffect(()=>{j({src:n,mode:w})},[n,w]);const x={...p,onError:A=>{if(D===Ln.FALLBACK)return;const $=Uk(D);j({src:n,mode:$}),$===Ln.FALLBACK&&(h==null||h(A))}};if(!n)return m.jsx("img",{ref:g,src:pc,...x,"data-empty-image":!0});const S=D===Ln.OPTIMIZED?v:null;if(!S){const A=D===Ln.FALLBACK,$=A?pc:Mk(n,v);return m.jsx("img",{ref:g,src:$,...x,"data-error-image":A||void 0})}const L=typeof a=="number"&&typeof u=="number"?{x:a,y:u}:void 0,T=s&&i?`${s} / ${i}`:void 0;return m.jsx(xv,{ref:g,parsed:S,fittingType:t,focalPoint:L,quality:d,aspectRatio:T,...x})});Rd.displayName="Image";function ue({children:n,className:t="",y:s=20,delay:i=0,as:a="div"}){const u=_.useRef(null),[d,h]=_.useState(!1);return _.useEffect(()=>{if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){h(!0);return}const g=u.current;if(!g)return;const v=new IntersectionObserver(([w])=>{w.isIntersecting&&(h(!0),v.disconnect())},{threshold:.12,rootMargin:"0px 0px -8% 0px"});return v.observe(g),()=>v.disconnect()},[]),m.jsx(a,{ref:u,className:t,style:{opacity:d?1:0,transform:d?"translateY(0)":`translateY(${s}px)`,transition:`opacity 450ms cubic-bezier(0.1,0.7,1,1) ${i}ms, transform 450ms cubic-bezier(0.1,0.7,1,1) ${i}ms`,willChange:"opacity, transform"},children:n})}const zk=[{n:"01",t:"Investment Discipline",d:"Integrated across the investment lifecycle"},{n:"02",t:"Portfolio Oversight",d:"Continuous monitoring of material exposures"},{n:"03",t:"Governance",d:"Defined accountability and escalation"},{n:"04",t:"Resilience",d:"Preparedness for changing market conditions"}];function Bk(){return m.jsxs("section",{className:"relative bg-[#17201F] text-[#F7F6F2] pt-[104px] overflow-hidden",children:[m.jsxs("div",{className:"absolute inset-0 opacity-[0.22]",children:[m.jsx(Rd,{src:"https://media.base44.com/images/public/6a7a8f88a5226fc8d9ff9bd0/3405a0a2a_generated_3c41db8c.png",alt:"Modern Doha architecture at dusk",className:"w-full h-full",fittingType:"fill"}),m.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(105deg, rgba(23,32,31,0.92) 0%, rgba(23,32,31,0.6) 60%, rgba(23,32,31,0.85) 100%)"}})]}),m.jsxs("div",{className:"relative max-w-[1360px] mx-auto px-[60px]",children:[m.jsxs("div",{className:"grid grid-cols-12 gap-6 pt-16 lg:pt-24 pb-0",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-7",children:[m.jsx(ue,{children:m.jsxs("div",{className:"flex items-center gap-3 mb-10",children:[m.jsx("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-[#8C7355]",children:"Asset Management"}),m.jsx("span",{className:"h-px w-6 bg-[#8C7355]/50"}),m.jsx("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-[#A8AEAB]",children:"Risk Management"})]})}),m.jsx(ue,{delay:80,children:m.jsxs("h1",{className:"text-[#F7F6F2] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(40px, 5vw, 66px)",lineHeight:1.05,maxWidth:"650px"},children:["Disciplined Risk.",m.jsx("br",{}),"Resilient Capital.",m.jsx("br",{}),m.jsx("span",{className:"text-[#8C7355]",children:"Long-Term Value."})]})}),m.jsx(ue,{delay:160,children:m.jsx("p",{className:"mt-10 text-[18px] leading-[1.7] text-[#C9C7C0] max-w-[620px]",children:"At Alrazah, risk management is embedded throughout our investment and asset management activities. We assess exposure, challenge assumptions, monitor portfolio developments and maintain disciplined oversight to protect capital and support sustainable long-term performance."})})]}),m.jsx("div",{className:"hidden lg:block col-span-5"})]}),m.jsx("div",{className:"relative mt-16 lg:mt-24 border-t border-[#263331]",children:m.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4",children:zk.map((n,t)=>m.jsx(ue,{delay:t*60,children:m.jsxs("div",{className:`py-8 pr-6 ${t>0?"lg:border-l lg:border-[#263331]":""} ${t===2?"border-l border-[#263331]":""} ${t%2===0?"border-r border-[#263331] lg:border-r-0":""}`,children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355]",children:n.n}),m.jsx("h3",{className:"mt-3 text-[15px] font-semibold text-[#F7F6F2]",children:n.t}),m.jsx("p",{className:"mt-2 text-[13px] leading-[1.55] text-[#A8AEAB] max-w-[200px]",children:n.d})]})},n.n))})}),m.jsx("div",{className:"h-24 lg:h-32"})]})]})}function Mn({index:n,children:t,tone:s="dark"}){const i="text-[#8C7355]";return m.jsxs("div",{className:"flex items-center gap-3",children:[n&&m.jsx("span",{className:`text-[11px] font-medium tracking-[0.14em] ${i}`,children:n}),m.jsx("span",{className:"h-px w-8 bg-[#8C7355]/60"}),m.jsx("span",{className:`text-[11px] font-medium uppercase tracking-[0.14em] ${i}`,children:t})]})}const $k=[{c:"Investment decisions",a:"Structured assessment"},{c:"Portfolio exposure",a:"Continuous oversight"},{c:"Material risks",a:"Defined escalation"},{c:"Emerging risks",a:"Forward-looking assessment"}];function Vk(){return m.jsx("section",{className:"bg-[#E8E5DE] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-5",children:[m.jsx(ue,{children:m.jsx(Mn,{index:"01",children:"Risk Discipline"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(30px, 3.4vw, 44px)",lineHeight:1.08},children:"Risk management is part of how we invest."})}),m.jsx(ue,{delay:140,children:m.jsx("p",{className:"mt-7 text-[16px] leading-[1.75] text-[#5D625E] max-w-[440px]",children:"We do not view risk as a separate consideration that begins after an investment decision has been made. It is incorporated into the assessment, structuring, approval and ongoing management of our investments."})})]}),m.jsx("div",{className:"col-span-12 lg:col-span-7 lg:pl-12 lg:border-l lg:border-[#C9C7C0]",children:m.jsx(ue,{delay:120,children:m.jsx("p",{className:"text-[#202522] font-medium",style:{fontSize:"clamp(26px, 2.6vw, 36px)",lineHeight:1.2,letterSpacing:"-0.01em"},children:"Every allocation of capital carries a responsibility to understand what can create value, what can erode it and how those outcomes can be managed."})})})]}),m.jsx(ue,{delay:120,children:m.jsx("div",{className:"mt-16 lg:mt-24 border-t border-[#C9C7C0]",children:m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",children:$k.map((n,t)=>m.jsxs("div",{className:`py-7 pr-6 ${t>0?"lg:border-l lg:border-[#C9C7C0]":""} ${t%2===1?"border-l border-[#C9C7C0] sm:border-l":""} ${t>=2?"border-t lg:border-t-0 sm:border-t-0":""} ${t===2?"sm:border-l-0 lg:border-l":""}`,children:[m.jsx("p",{className:"text-[11px] uppercase tracking-[0.14em] text-[#5D625E]",children:"Category"}),m.jsx("p",{className:"mt-1.5 text-[15px] font-semibold text-[#17201F]",children:n.c}),m.jsx("div",{className:"mt-4 h-px w-6 bg-[#8C7355]"}),m.jsx("p",{className:"mt-3 text-[11px] uppercase tracking-[0.14em] text-[#5D625E]",children:"Approach"}),m.jsx("p",{className:"mt-1.5 text-[15px] text-[#202522]",children:n.a})]},n.c))})})})]})})}const $i=[{n:"01",t:"Origination",d:"Initial opportunity screening and strategic fit."},{n:"02",t:"Assessment",d:"Commercial, financial, operational and market analysis."},{n:"03",t:"Approval",d:"Structured review and investment decision-making."},{n:"04",t:"Monitoring",d:"Ongoing assessment of performance, exposure and material developments."},{n:"05",t:"Realisation",d:"Review of outcomes, value creation and lessons informing future decisions."}];function Hk(){const[n,t]=_.useState(0);return m.jsx("section",{className:"bg-[#F7F6F2] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-7",children:[m.jsx(ue,{children:m.jsx(Mn,{children:"Our Approach"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(28px, 3vw, 40px)",lineHeight:1.1},children:"Risk is considered before capital is committed—and throughout the life of every investment."})})]}),m.jsx("div",{className:"col-span-12 lg:col-span-5 lg:pt-2",children:m.jsx(ue,{delay:140,children:m.jsx("p",{className:"text-[16px] leading-[1.75] text-[#5D625E]",children:"Our approach combines disciplined analysis, informed judgement and ongoing oversight. We seek to understand the underlying drivers of risk, evaluate potential downside scenarios and ensure that investment decisions remain aligned with our broader objectives for sustainable growth and capital preservation."})})})]}),m.jsx(ue,{delay:120,children:m.jsxs("div",{className:"mt-16 lg:mt-24",children:[m.jsxs("div",{className:"hidden lg:block relative",children:[m.jsx("div",{className:"absolute top-[18px] left-0 right-0 h-px bg-[#C9C7C0]",style:{width:"85%"}}),m.jsx("div",{className:"absolute top-[18px] h-px bg-[#8C7355] transition-all duration-500",style:{width:`${n/($i.length-1)*85}%`}}),m.jsx("div",{className:"relative grid grid-cols-5",style:{width:"85%"},children:$i.map((s,i)=>m.jsxs("button",{onMouseEnter:()=>t(i),onFocus:()=>t(i),onClick:()=>t(i),className:"text-left group focus:outline-none","aria-label":`Stage ${s.n}: ${s.t}`,children:[m.jsx("span",{className:"block w-[37px] h-[37px] rounded-full border transition-colors duration-300 mb-5 flex items-center justify-center text-[12px] font-semibold",style:{borderColor:i<=n?"#8C7355":"#C9C7C0",backgroundColor:i<=n?"#8C7355":"#F7F6F2",color:i<=n?"#F7F6F2":"#5D625E"},children:s.n}),m.jsx("span",{className:"block text-[15px] font-semibold transition-colors",style:{color:i===n?"#17201F":"#5D625E"},children:s.t})]},s.n))})]}),m.jsx("div",{className:"mt-8 lg:mt-10 border-t border-[#C9C7C0] pt-6 min-h-[80px]",children:m.jsxs("div",{className:"flex items-start gap-4",children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355] pt-1",children:$i[n].n}),m.jsx("p",{className:"text-[17px] leading-[1.6] text-[#202522] max-w-[680px]",children:$i[n].d})]})}),m.jsx("div",{className:"lg:hidden space-y-6",children:$i.map(s=>m.jsxs("div",{className:"flex items-start gap-4 pb-6 border-b border-[#C9C7C0]",children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355] pt-1",children:s.n}),m.jsxs("div",{children:[m.jsx("p",{className:"text-[15px] font-semibold text-[#17201F]",children:s.t}),m.jsx("p",{className:"mt-1 text-[14px] leading-[1.6] text-[#5D625E]",children:s.d})]})]},s.n))})]})})]})})}const Wk=[{n:"01",t:"Market & Macroeconomic",d:"Assessment of market conditions, economic developments, interest-rate environments, inflationary pressures and other external factors that may influence portfolio performance."},{n:"02",t:"Investment & Portfolio",d:"Assessment of concentration, exposure, investment assumptions, portfolio composition and performance drivers."},{n:"03",t:"Liquidity & Financial",d:"Monitoring of liquidity requirements, funding considerations, financial commitments and relevant balance-sheet exposures."},{n:"04",t:"Operational",d:"Consideration of operational dependencies, processes, systems, execution capabilities and business continuity."},{n:"05",t:"Counterparty & Credit",d:"Assessment of counterparties, contractual relationships, creditworthiness and exposure to third parties."},{n:"06",t:"Regulatory & Compliance",d:"Consideration of applicable legal, regulatory and governance requirements across relevant activities and jurisdictions."}];function qk(){return m.jsx("section",{className:"bg-[#263331] text-[#F7F6F2] py-24 lg:py-32",children:m.jsx("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-4",children:[m.jsx(ue,{children:m.jsx(Mn,{tone:"light",children:"Integrated Framework"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#F7F6F2] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(28px, 3vw, 40px)",lineHeight:1.1},children:"An integrated framework for understanding exposure."})}),m.jsx(ue,{delay:140,children:m.jsx("p",{className:"mt-7 text-[16px] leading-[1.75] text-[#A8AEAB] max-w-[420px]",children:"Alrazah's risk framework is designed to provide a structured view of the factors that may influence investment outcomes, portfolio resilience and enterprise performance."})})]}),m.jsx("div",{className:"col-span-12 lg:col-span-8",children:m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-px bg-[#3a4744] border border-[#3a4744]",children:Wk.map((n,t)=>m.jsx(ue,{delay:t%3*60,children:m.jsxs("div",{className:"group bg-[#263331] p-8 min-h-[220px] flex flex-col transition-colors duration-300 hover:bg-[#2d3b38]","aria-labelledby":`rf-${t}`,children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355]",children:n.n}),m.jsx("span",{className:"h-px w-8 bg-[#8C7355]/40 group-hover:bg-[#8C7355] transition-colors"})]}),m.jsx("h3",{id:`rf-${t}`,className:"text-[16px] font-semibold text-[#F7F6F2] mb-4 tracking-tight",children:n.t}),m.jsx("p",{className:"text-[14px] leading-[1.65] text-[#A8AEAB]",children:n.d})]})},n.n))})})]})})})}const Qk=[{n:"01",t:"Board Oversight",d:"Strategic oversight, governance and accountability for the Company’s risk environment.",tags:["Strategy","Accountability","Governance Policy"],h:"h-[160px]"},{n:"02",t:"Executive Management",d:"Translation of strategic objectives into operating priorities, controls and management actions.",tags:["Operating Priorities","Controls","Management Action"],h:"h-[140px]"},{n:"03",t:"Investment & Operating Functions",d:"Identification, assessment and management of risks arising within investment and operational activities.",tags:["Identification","Assessment","Management"],h:"h-[120px]"}];function Kk(){return m.jsx("section",{className:"bg-[#D7D3C9] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12 mb-16 lg:mb-24",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-7",children:[m.jsx(ue,{children:m.jsx(Mn,{children:"Governance"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(28px, 3vw, 42px)",lineHeight:1.08},children:"Clear accountability. Independent challenge. Disciplined oversight."})})]}),m.jsx("div",{className:"col-span-12 lg:col-span-5 lg:pt-2",children:m.jsx(ue,{delay:140,children:m.jsx("p",{className:"text-[16px] leading-[1.75] text-[#5D625E]",children:"Effective risk management depends on clearly defined responsibilities and appropriate oversight. Alrazah's governance structure supports informed decision-making by establishing accountability across investment, management and oversight functions."})})})]}),m.jsx("div",{className:"space-y-px",children:Qk.map((n,t)=>m.jsx(ue,{delay:t*80,children:m.jsxs("div",{className:`group relative w-full ${n.h} bg-[#ECEAE4] border border-[#C9C7C0] flex items-center px-8 lg:px-12 transition-colors duration-300 hover:bg-[#F7F6F2]`,children:[m.jsx("div",{className:"flex-shrink-0 w-[80px] lg:w-[120px]",children:m.jsx("span",{className:"text-[44px] lg:text-[64px] font-light leading-none text-[#8C7355]",children:n.n})}),m.jsxs("div",{className:"flex-1 px-6 lg:px-10 border-l border-[#C9C7C0]",children:[m.jsx("h3",{className:"text-[18px] lg:text-[22px] font-semibold text-[#17201F] tracking-tight",children:n.t}),m.jsx("p",{className:"mt-2 text-[14px] lg:text-[15px] leading-[1.6] text-[#5D625E] max-w-[560px]",children:n.d})]}),m.jsx("div",{className:"hidden lg:flex flex-shrink-0 flex-wrap gap-2 justify-end max-w-[280px]",children:n.tags.map(s=>m.jsx("span",{className:"text-[11px] uppercase tracking-[0.1em] text-[#5D625E] border border-[#C9C7C0] px-3 py-1.5",children:s},s))})]})},n.n))})]})})}const Mr=[{n:"01",t:"Market Conditions",d:"Changes in economic and market conditions that may affect investment performance."},{n:"02",t:"Concentration",d:"Exposure arising from portfolio, sector, geographic or counterparty concentration."},{n:"03",t:"Financial Exposure",d:"Financial commitments, funding requirements, liquidity and balance-sheet considerations."},{n:"04",t:"Operational Continuity",d:"Risks associated with systems, processes, people, infrastructure and business continuity."},{n:"05",t:"Counterparty",d:"Exposure to counterparties, partners, tenants, suppliers and other third parties where relevant."},{n:"06",t:"Regulatory Environment",d:"Changes in laws, regulations and regulatory expectations affecting relevant activities."},{n:"07",t:"Emerging Risks",d:"New or evolving developments that may materially affect the operating or investment environment."}];function Ur({r:n,large:t}){return m.jsxs("div",{className:`group border border-[#C9C7C0] bg-[#FFFFFF] p-7 lg:p-9 flex flex-col justify-between transition-colors duration-300 hover:bg-[#F7F6F2] ${t?"lg:min-h-[240px]":"min-h-[200px]"}`,children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355]",children:n.n}),m.jsx("span",{className:"h-px w-8 bg-[#C9C7C0] group-hover:bg-[#8C7355] transition-colors"})]}),m.jsxs("div",{className:"mt-8",children:[m.jsx("h3",{className:"text-[19px] lg:text-[22px] font-semibold text-[#17201F] tracking-tight",children:n.t}),m.jsx("p",{className:"mt-3 text-[14px] leading-[1.65] text-[#5D625E] max-w-[360px]",children:n.d})]})]})}function Gk(){return m.jsx("section",{className:"bg-[#FFFFFF] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12 mb-16 lg:mb-20",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-6",children:[m.jsx(ue,{children:m.jsx(Mn,{children:"Principal Risk Areas"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(28px, 3vw, 42px)",lineHeight:1.08},children:"Understanding the factors that can affect value."})})]}),m.jsx("div",{className:"col-span-12 lg:col-span-6 lg:pt-2",children:m.jsx(ue,{delay:140,children:m.jsx("p",{className:"text-[16px] leading-[1.75] text-[#5D625E]",children:"Our risk assessment considers the characteristics of individual investments as well as the broader conditions in which they operate. The emphasis is on identifying material exposures early, understanding their potential implications and maintaining appropriate oversight throughout the investment lifecycle."})})})]}),m.jsxs("div",{className:"space-y-px",children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-px",children:[m.jsx(ue,{children:m.jsx(Ur,{r:Mr[0],large:!0})}),m.jsx(ue,{delay:60,children:m.jsx(Ur,{r:Mr[1],large:!0})})]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-px",children:[m.jsx(ue,{children:m.jsx(Ur,{r:Mr[2]})}),m.jsx(ue,{delay:60,children:m.jsx(Ur,{r:Mr[3]})}),m.jsx(ue,{delay:120,children:m.jsx(Ur,{r:Mr[4]})})]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-px",children:[m.jsx(ue,{children:m.jsx(Ur,{r:Mr[5],large:!0})}),m.jsx(ue,{delay:60,children:m.jsx(Ur,{r:Mr[6],large:!0})})]})]})]})})}const Xk=[{t:"Before Investment",items:["Strategic alignment","Opportunity assessment","Due diligence","Downside considerations","Key assumptions"]},{t:"At Investment",items:["Investment structure","Approval requirements","Capital allocation","Risk considerations","Relevant controls"]},{t:"During Ownership",items:["Portfolio monitoring","Performance assessment","Exposure review","Material developments","Management reporting"]},{t:"When Conditions Change",items:["Reassessment","Escalation","Corrective action","Strategic review","Capital protection"]}];function Yk(){return m.jsx("section",{className:"bg-[#1D2830] text-[#F7F6F2] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12 mb-16 lg:mb-20",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-7",children:[m.jsx(ue,{children:m.jsx(Mn,{tone:"light",children:"Lifecycle Controls"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#F7F6F2] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(28px, 3vw, 42px)",lineHeight:1.08},children:"Risk oversight continues after the investment decision."})})]}),m.jsx("div",{className:"col-span-12 lg:col-span-5 lg:pt-2",children:m.jsx(ue,{delay:140,children:m.jsx("p",{className:"text-[16px] leading-[1.75] text-[#A8AEAB]",children:"Investment risk does not end at approval. Ongoing monitoring allows Alrazah to evaluate developments against established expectations, identify material changes and respond where circumstances require reassessment."})})})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-px border border-[#33414a]",children:Xk.map((n,t)=>m.jsx(ue,{delay:t*70,children:m.jsxs("div",{className:"bg-[#1D2830] p-8 lg:p-9 min-h-[300px] flex flex-col",children:[m.jsx("div",{className:"flex items-center justify-between mb-6 pb-6 border-b border-[#33414a]",children:m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355]",children:String(t+1).padStart(2,"0")})}),m.jsx("h3",{className:"text-[16px] font-semibold text-[#F7F6F2] mb-6 tracking-tight uppercase",children:n.t}),m.jsx("ul",{className:"space-y-3",children:n.items.map(s=>m.jsxs("li",{className:"flex items-start gap-3 text-[14px] text-[#A8AEAB]",children:[m.jsx("span",{className:"mt-[7px] h-px w-3 bg-[#8C7355] flex-shrink-0"}),s]},s))})]})},n.t))})]})})}const Jk=["Market environment","Financial performance","Operational performance","Liquidity","Concentration","Counterparty exposure","Regulatory developments","Strategic position"],Xm=["Monitor","Assess","Escalate","Respond"],Zk=(n,t)=>["monitor","assess","escalate","respond"][t];function eR({kind:n}){const t={monitor:"border border-[#C9C7C0] bg-transparent",assess:"bg-[#C9C7C0]",escalate:"bg-[#5D625E]",respond:"bg-[#8C7355]"};return m.jsxs("span",{className:"inline-flex items-center gap-2",children:[m.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${t[n]}`}),m.jsx("span",{className:"text-[12px] text-[#5D625E] capitalize",children:n})]})}function tR(){return m.jsx("section",{className:"bg-[#ECEAE4] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsx("div",{className:"grid grid-cols-12 gap-6 lg:gap-12 mb-16 lg:mb-20",children:m.jsxs("div",{className:"col-span-12 lg:col-span-5",children:[m.jsx(ue,{children:m.jsx(Mn,{children:"Portfolio Monitoring"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(30px, 3.4vw, 44px)",lineHeight:1.08},children:"Visibility across the portfolio."})}),m.jsx(ue,{delay:140,children:m.jsx("p",{className:"mt-7 text-[16px] leading-[1.75] text-[#5D625E] max-w-[420px]",children:"Ongoing monitoring supports informed management of portfolio exposures and enables material developments to be identified, assessed and escalated through appropriate governance channels."})})]})}),m.jsx(ue,{delay:120,children:m.jsxs("div",{className:"border border-[#C9C7C0] bg-[#F7F6F2] overflow-hidden",children:[m.jsxs("div",{className:"grid grid-cols-[1.4fr_1fr_1fr_1fr_1fr] border-b border-[#C9C7C0]",children:[m.jsx("div",{className:"px-6 py-5 text-[11px] uppercase tracking-[0.14em] text-[#5D625E]",children:"Oversight Domain"}),Xm.map((n,t)=>m.jsx("div",{className:`px-6 py-5 text-[11px] uppercase tracking-[0.14em] text-[#5D625E] ${t>0?"border-l border-[#C9C7C0]":""}`,children:n},n))]}),Jk.map((n,t)=>m.jsxs("div",{className:`grid grid-cols-[1.4fr_1fr_1fr_1fr_1fr] ${t>0?"border-t border-[#E8E5DE]":""}`,children:[m.jsx("div",{className:"px-6 py-5 text-[14px] font-medium text-[#17201F]",children:n}),Xm.map((s,i)=>m.jsx("div",{className:`px-6 py-5 flex items-center ${i>0?"border-l border-[#E8E5DE]":""}`,children:m.jsx(eR,{kind:Zk(t,i)})},i))]},n))]})}),m.jsx(ue,{delay:160,children:m.jsx("p",{className:"mt-6 text-[12px] text-[#5D625E] max-w-[520px]",children:"Indicative oversight matrix. Indicators represent qualitative action phases applied to each oversight domain — not quantitative risk scores."})})]})})}const nR=[{n:"01",t:"Anticipate",d:"Identify material developments and challenge assumptions before they become significant exposures."},{n:"02",t:"Respond",d:"Escalate relevant issues through defined governance and management channels."},{n:"03",t:"Adapt",d:"Reassess assumptions, priorities and actions as circumstances evolve."}];function rR(){return m.jsx("section",{className:"bg-[#F7F6F2] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12 mb-16 lg:mb-20",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-7",children:[m.jsx(ue,{children:m.jsx(Mn,{children:"Resilience & Response"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(30px, 3.4vw, 44px)",lineHeight:1.08},children:"Preparedness is part of resilience."})})]}),m.jsx("div",{className:"col-span-12 lg:col-span-5 lg:pt-2",children:m.jsx(ue,{delay:140,children:m.jsx("p",{className:"text-[16px] leading-[1.75] text-[#5D625E]",children:"Strong risk management is not solely about identifying potential threats. It is also about maintaining the organizational capacity to respond when conditions change."})})})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-px border-y border-[#C9C7C0]",children:nR.map((n,t)=>m.jsx(ue,{delay:t*80,children:m.jsxs("div",{className:"group py-12 lg:py-16 px-2 md:px-8 flex flex-col",children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355]",children:n.n}),m.jsx("h3",{className:"mt-6 text-[28px] lg:text-[34px] font-medium text-[#17201F] tracking-tight",children:n.t}),m.jsx("div",{className:"mt-6 h-px w-12 bg-[#8C7355]"}),m.jsx("p",{className:"mt-6 text-[15px] leading-[1.7] text-[#5D625E] max-w-[300px]",children:n.d})]})},n.n))})]})})}function sR(){return m.jsxs("section",{className:"relative bg-[#263331] text-[#F7F6F2] py-24 lg:py-36 overflow-hidden",children:[m.jsxs("div",{className:"absolute inset-0 opacity-[0.18]",children:[m.jsx(Rd,{src:"https://media.base44.com/images/public/6a7a8f88a5226fc8d9ff9bd0/97bfbd53b_generated_a8088b7f.png",alt:"Doha West Bay skyline",className:"w-full h-full",fittingType:"fill"}),m.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(180deg, rgba(38,51,49,0.85) 0%, rgba(38,51,49,0.7) 100%)"}})]}),m.jsx("div",{className:"relative max-w-[1360px] mx-auto px-[60px]",children:m.jsxs("div",{className:"max-w-[820px]",children:[m.jsx(ue,{children:m.jsx("h2",{className:"text-[#F7F6F2] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(30px, 3.6vw, 48px)",lineHeight:1.1},children:"Protecting long-term value requires discipline at every stage of the investment cycle."})}),m.jsx(ue,{delay:120,children:m.jsx("p",{className:"mt-8 text-[18px] leading-[1.75] text-[#C9C7C0] max-w-[680px]",children:"Alrazah's approach to risk management reflects our broader responsibility as a long-term investor and holding company. By maintaining disciplined oversight of material exposures, we seek to strengthen resilience, preserve capital and support sustainable value creation across our portfolio."})}),m.jsx(ue,{delay:200,children:m.jsx("div",{className:"mt-12 pt-8 border-t border-[#3a4744]",children:m.jsx("p",{className:"text-[#8C7355] font-medium",style:{fontSize:"clamp(28px, 3vw, 40px)",lineHeight:1.15,letterSpacing:"-0.01em"},children:"Risk discipline is ultimately an expression of stewardship."})})})]})})]})}const iR=[{t:"Discipline",d:"We apply structured analysis and defined decision-making processes."},{t:"Transparency",d:"We support informed oversight through appropriate reporting and escalation."},{t:"Accountability",d:"Responsibilities are clearly established across governance and management functions."},{t:"Resilience",d:"We consider changing conditions and seek to maintain the capacity to respond."}];function oR(){return m.jsx("section",{className:"bg-[#D7D3C9] py-24 lg:py-32",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsx(ue,{children:m.jsx(Mn,{children:"Institutional Principles"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-7 mb-16 lg:mb-20 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(28px, 3vw, 42px)",lineHeight:1.08},children:"Principles that guide our approach."})}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 border-t border-[#C9C7C0]",children:iR.map((n,t)=>m.jsx(ue,{delay:t%4*70,children:m.jsxs("div",{className:`py-10 pr-6 ${t>0?"lg:border-l lg:border-[#C9C7C0]":""} ${t%2===1?"md:border-l md:border-[#C9C7C0] lg:border-l":""} ${t>=2?"border-t md:border-t-0 lg:border-t-0 border-[#C9C7C0]":""}`,children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355]",children:String(t+1).padStart(2,"0")}),m.jsx("h3",{className:"mt-5 text-[22px] font-semibold text-[#17201F] tracking-tight",children:n.t}),m.jsx("p",{className:"mt-4 text-[14px] leading-[1.7] text-[#5D625E] max-w-[240px]",children:n.d})]})},n.t))})]})})}function aR(){return m.jsx("section",{className:"bg-[#FFFFFF] py-24 lg:py-32",children:m.jsx("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:m.jsxs("div",{className:"grid grid-cols-12 gap-6 lg:gap-12 items-end",children:[m.jsxs("div",{className:"col-span-12 lg:col-span-8",children:[m.jsx(ue,{children:m.jsx("span",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[#8C7355]",children:"Alrazah Holding"})}),m.jsx(ue,{delay:80,children:m.jsx("h2",{className:"mt-6 text-[#17201F] font-medium tracking-[-0.02em]",style:{fontSize:"clamp(32px, 4vw, 54px)",lineHeight:1.08},children:"A disciplined approach to long-term value."})}),m.jsx(ue,{delay:160,children:m.jsx("p",{className:"mt-7 text-[17px] leading-[1.7] text-[#5D625E] max-w-[560px]",children:"Explore how Alrazah's investment approach, portfolio capabilities and governance framework work together to support sustainable growth."})})]}),m.jsxs("div",{className:"col-span-12 lg:col-span-4 flex flex-col gap-4",children:[m.jsx(ue,{delay:120,children:m.jsxs("a",{href:"/our-business/asset-management/investment-strategy/",className:"group flex items-center justify-between gap-4 bg-[#17201F] text-[#F7F6F2] px-7 py-6 min-h-[64px] transition-colors hover:bg-[#263331]",children:[m.jsx("span",{className:"text-[15px] font-semibold",children:"Explore Our Investment Strategy"}),m.jsx(wc,{size:18,className:"group-hover:translate-x-1 transition-transform"})]})}),m.jsx(ue,{delay:180,children:m.jsxs("a",{href:"/our-business/asset-management/portfolio-performance/",className:"group flex items-center justify-between gap-4 border border-[#C9C7C0] text-[#17201F] px-7 py-6 min-h-[64px] transition-colors hover:bg-[#F7F6F2]",children:[m.jsx("span",{className:"text-[15px] font-semibold",children:"Explore Portfolio Performance"}),m.jsx(wc,{size:18,className:"group-hover:translate-x-1 transition-transform"})]})})]})]})})})}const lR=[{t:"Investment Strategy",d:"How we identify, evaluate and structure long-term investments.",href:"/our-business/asset-management/investment-strategy/"},{t:"Portfolio Performance",d:"Ongoing oversight across the Alrazah portfolio.",href:"/our-business/asset-management/portfolio-performance/"},{t:"Risk Management",d:"Disciplined oversight protecting capital across the lifecycle.",href:"/our-business/asset-management/risk-management/",current:!0},{t:"Our Business",d:"The full scope of Alrazah Holding activities.",href:"/our-business/"}];function uR(){return m.jsx("section",{className:"bg-[#F1EFEA] py-20 lg:py-24 border-t border-[#C9C7C0]",children:m.jsxs("div",{className:"max-w-[1360px] mx-auto px-[60px]",children:[m.jsx(ue,{children:m.jsx("h2",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[#8C7355] mb-10",children:"Explore Asset Management"})}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 border-t border-[#C9C7C0]",children:lR.map((n,t)=>m.jsx(ue,{delay:t%4*60,children:m.jsxs("a",{href:n.href,className:`group block py-8 pr-6 ${t>0?"lg:border-l lg:border-[#C9C7C0]":""} ${t%2===1?"md:border-l md:border-[#C9C7C0] lg:border-l":""} ${t>=2?"border-t md:border-t-0 lg:border-t-0 border-[#C9C7C0]":""} ${n.current?"cursor-default":"hover:bg-[#ECEAE4]"}`,children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("span",{className:"text-[12px] font-medium tracking-[0.14em] text-[#8C7355]",children:String(t+1).padStart(2,"0")}),n.current?m.jsx("span",{className:"text-[10px] uppercase tracking-[0.14em] text-[#5D625E]",children:"Current"}):m.jsx(wc,{size:16,className:"text-[#5D625E] group-hover:translate-x-1 group-hover:text-[#8C7355] transition-all"})]}),m.jsx("h3",{className:`text-[17px] font-semibold tracking-tight ${n.current?"text-[#8C7355]":"text-[#17201F]"}`,children:m.jsx("span",{className:`relative ${n.current?"":"after:absolute after:left-0 after:-bottom-1 after:h-px after:w-0 after:bg-[#8C7355] group-hover:after:w-full after:transition-all"}`,children:n.t})}),m.jsx("p",{className:"mt-3 text-[13px] leading-[1.6] text-[#5D625E] max-w-[260px]",children:n.d})]})},n.t))})]})})}function cR(){return _.useEffect(()=>{if(document.title="Risk Management | Alrazah Holding",!document.querySelector('meta[name="description"]')){const t=document.createElement("meta");t.name="description",t.content="Discover how Alrazah integrates disciplined risk management, governance and portfolio oversight into its approach to long-term investment and sustainable value creation.",document.head.appendChild(t)}},[]),m.jsxs("div",{className:"bg-[#F7F6F2] min-h-screen",children:[m.jsx(Rk,{}),m.jsxs("main",{children:[m.jsx(Bk,{}),m.jsx(Vk,{}),m.jsx(Hk,{}),m.jsx(qk,{}),m.jsx(Kk,{}),m.jsx(Gk,{}),m.jsx(Yk,{}),m.jsx(tR,{}),m.jsx(rR,{}),m.jsx(sR,{}),m.jsx(oR,{}),m.jsx(aR,{}),m.jsx(uR,{})]}),m.jsx(Pk,{})]})}const dR=()=>{const{isLoadingAuth:n,isLoadingPublicSettings:t,authError:s,navigateToLogin:i}=Sk();if(t||n)return m.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:m.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return m.jsx(_k,{});if(s.type==="auth_required")return i(),null}return m.jsxs(pS,{children:[m.jsx(Fc,{path:"/our-business/asset-management/risk-management",element:m.jsx(cR,{})}),m.jsx(Fc,{path:"*",element:m.jsx(xk,{})})]})};function fR(){return m.jsx(Ek,{children:m.jsxs(aE,{client:xE,children:[m.jsxs(ES,{children:[m.jsx(Ck,{}),m.jsx(dR,{})]}),m.jsx(I1,{})]})})}Tw.createRoot(document.getElementById("root")).render(m.jsx(fR,{}));